Recent

Author Topic: Pixie: A lightweight HTML/CSS rendering engine for Free Pascal and Lazarus 🌟  (Read 14703 times)

Wallaby

  • Guest
@retrofoxed,

Off topic and strictly a matter of curiosity (IOW, I have no intention to elaborate on whatever your answer is), did you use any A.I model to help you develop Pixie ? and, if the answer is "yes", do you continue to rely on A.I for its further development (including bug fixes and such) ?

Thank you (since the topic of A.I seems to be a sensitive one, I will not make any comments on whatever your answers are.)

Yeah, I know AI is a bit of a mixed topic around here. Personally I’m on the pro side. After ~25 years of writing code by hand, I’d rather focus on architecture and higher-level stuff than grind through low-level details.

So yeah — Pixie was built with the help of AI (mainly Claude Code), and the first version came together in about two weeks. Doing the same solo would’ve taken a lot longer, potentially years.

And yes, I still use AI as part of the workflow, including for fixes and ongoing work. It’s just a tool that makes things faster.

As for AI in general, I get that people have different opinions. Totally fair — just not something I’m looking to get into debates about 🙂

440bx

  • Hero Member
  • *****
  • Posts: 6540
Thank you retrofoxed.

As for AI in general, I get that people have different opinions. Totally fair — just not something I’m looking to get into debates about 🙂
I fully understand... <chuckle> 
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

440bx

  • Hero Member
  • *****
  • Posts: 6540
Actually I have another question that is "A.I debate" neutral, which is, do you use the free version or the paid version ? and if you use the paid version, can you provide an estimate/ballpark of how much Pixie cost you (apologies if I am crossing a line here) ?
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Wallaby

  • Guest
Actually I have another question that is "A.I debate" neutral, which is, do you use the free version or the paid version ? and if you use the paid version, can you provide an estimate/ballpark of how much Pixie cost you (apologies if I am crossing a line here) ?

No worries 😄

I’ve tried a few options over the past few months — mainly Google’s Gemini, OpenAI Codex, and Anthropic’s Claude CLI. For agent-style development, I found Gemini to be the weakest, Codex somewhere in the middle, and Claude clearly the best — especially with the newer Opus 4.5 and 4.6 models.

My setup is pretty minimal: no IDE, just a terminal running Claude Code CLI. I’m on the max plan, which is about $200 USD/month flat. There is a usage cap, but in practice I’ve never even hit 50% of it — even when running multiple parallel sessions.

So in terms of cost, it’s just the subscription, which I already use for a bunch of other things anyway (work, apps, customer support, etc.). That said, it’s definitely not a “psst, build me an HTML renderer” kind of deal 😄 — I’ve spent a fair amount of time guiding and steering it.

Running a small software business, though, it’s been a massive productivity boost. Honestly, it feels like having a few extra developers who will take on pretty much anything I throw at them. Over the last few months I’ve improved existing apps, built new ones, and even tackled areas outside my usual expertise (like HTML rendering).

Overall, it’s been a big win — a noticeable increase in output and quality for what is, effectively, a fixed and quite reasonable cost.

440bx

  • Hero Member
  • *****
  • Posts: 6540
Thank you @retrofoxed.  I greatly appreciate the detailed reply.  In a few lines, you've provided a lot of very useful information, thank you again!.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

mdalacu

  • Full Member
  • ***
  • Posts: 245
    • dmSimpleApps
Would you ever make it available through OPM? Thanks

Wallaby

  • Guest
Would you ever make it available through OPM? Thanks

I've emailed to the OPM guy, but no response, so I don't really know what's happening there.

Besides, at this stage Pixie is in active development, so it's bettert if you guys just grab the latest source and install manually - it's not that hard, just open LPK + compile + rebuild lazarus + restart => all takes ~1m.

apeoperaio

  • Sr. Member
  • ****
  • Posts: 298
I tried the demo on MacOS but I get the following error:
Pixie.Canvas.CG.pas(153,1) Error: Internal error 200609171
Lazarus 4.4 (rev lazarus_4_4) FPC 3.2.2 aarch64-darwin-cocoa

This is a known FPC 3.2.2 bug — the DWARF3 debug info generator doesn't handle Objective-C types used by the Cocoa widgetset, so the compiler crashes when emitting debug data.

The demo defaults to Debug mode with DWARF3, which triggers the issue. Two options:

1. Build in Release mode — switch to Release in the build mode dropdown (or pass --bm=Release).
2. Switch to DWARF2 — in Project Options → Debugging, change debug info type from DWARF3 to DWARF2 or NONE.

This is fixed in FPC main and probably in 3.2.3.

Thanks!

wp

  • Hero Member
  • *****
  • Posts: 13578
Would you ever make it available through OPM? Thanks
I've emailed to the OPM guy, but no response, so I don't really know what's happening there.
I did receive a mail mentioning Pixie, but it was not clear that it was from you and that you were asking to add Pixie to OPM. It just read like a message sent by somebody wanting to notify us of this package. But that's not the way OPM works: When code is added to OPM we need the commitment of the author to maintain the code. It happens too often during FPC/Lazarus development that function signatures are changed, functions are moved to other units, or deprecated identifiers are removed; therefore, a submitted package may not compile any more. We cannot fix such issues since we do not have write access to your repository. Therefore, a maintainer is absolutely necessary.

Besides, at this stage Pixie is in active development, so it's bettert if you guys just grab the latest source and install manually - it's not that hard, just open LPK + compile + rebuild lazarus + restart => all takes ~1m.
Absolutely correct. OPM is not a development platform, but a distribution platform. Only stable packages should be available in OPM. So, if you want to take the responsibility to maintain your code for OPM, I am asking you: when you feel that the development has reach some kind of stability send that mail again, identify yourself as the author of the package, refer to this forum thread and provide a link to your repository from where I can take the zip file with all source.

440bx

  • Hero Member
  • *****
  • Posts: 6540
This post's purpose is to shamelessly plant an idea in (Wallaby/retrofoxed)'s mind. 

It's great to have a lightweight HTML/CSS rendering engine for FPC and Lazarus, it would be great too to have a lightweight rendering engine for markdown.    Very useful to read A.I's md files (among other's) ;)

A markdown rendering engine should be easier/simpler to produce than one for HTML and the experience gained in developing the HTML one can likely be used in the development of the markdown one.

That's the idea... create a lightweight markdown rendering engine.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

AlexTP

  • Hero Member
  • *****
  • Posts: 2715
    • UVviewsoft
And the markdown engine don't need support for CSS with all those compex and super-complex css features. Yes, idea makes sense. But. It makes sense if MD engine won't be the wrapped HTML/CSS engine. Ie the final exe code must include only the MD-related code (small one), not the entire HTML/CSS code (huge one).
« Last Edit: May 02, 2026, 10:20:27 am by AlexTP »

dsiders

  • Hero Member
  • *****
  • Posts: 1635
I'm not trying to discourage anything (or anyone), but...

FPC main already has MD to html | fpdoc | latex support in the fcl-md package. It targets CommonMark IIRC.
Not sure when we'll see it in a release. Not sure if it's usable in FPC 3.2.2... I haven't tried.

[Edit]

Anf after looking... it's already been added to Lazarus trunk as an installable package in components/markdown.
« Last Edit: May 02, 2026, 10:24:21 am by dsiders »

440bx

  • Hero Member
  • *****
  • Posts: 6540
@dsiders,

Is it a pure md rendering engine or it does more than just render ?   The reason I ask is because, having something that is really lightweight would be very nice, i.e, just rendering and nothing else.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

cdbc

  • Hero Member
  • *****
  • Posts: 2818
    • http://www.cdbc.dk
Hi
Quote
<440bx>It's great to have a lightweight HTML/CSS rendering engine for FPC and Lazarus, it would be great too to have a lightweight rendering engine for markdown.</440bx>
If I may only whisper: 'Plugins'...
Implement the parsers as plugins to the renderer, then one could just feed, say a factory, the filename and it would choose the right plugin and plug it in  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

440bx

  • Hero Member
  • *****
  • Posts: 6540
@cdbc,

developing an md viewer isn't something I want to do at this time.  I figured I'd suggest it to @retrofoxed because his pixie is pretty much a fairly large superset of what an md viewer is and thought that he could probably leverage some of the knowledge he gained in the pixie development to create an md viewer with less effort.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018