3 ms·
Looks great! I was particularly impressed by the following: >"A built-in lightweight HTML view widget renders documentation-style markup with cascading styles
by peter_d_sherman 2mo ago
Looks great!
I was particularly impressed by the following:
>"A built-in lightweight HTML view widget renders documentation-style markup with cascading styles."
Basically you built a miniature, integrated, embedded, open-source web browser which can parse CSS and render to SDL... very impressive!:
https://github.com/ovenpasta/adi2/blob/master/src/adi-widget-html_view.adb https://github.com/ovenpasta/adi2/blob/master/src/adi-widget...
https://github.com/ovenpasta/adi2/blob/master/src/adi-widget-html_view.ads https://github.com/ovenpasta/adi2/blob/master/src/adi-widget...
Also, it should be possible to easily, easily port this source code to Delphi and/or FreePascal and/or Graeme Geldenhuys' "Blaise" language (A modern, self-hosting Object Pascal compiler, https://github.com/graemeg/blaise https://github.com/graemeg/blaise) should anyone in those respective communities decide to do that...
Also, if Ada had an {$IFDEF} equivalent, then with proper use of {$IFDEF's} (since the source code is so similar across these language families), the source code could potentially support all of the above languages from a single source code base...
But, of course, maybe that wouldn't be desired... maybe individual ports would serve those other communities better... and then again, maybe it wouldn't!
(Just thinking aloud... :-) )
Anyway, great work, and once again, very impressed by the lightweight HTML view widget!
- stymaar 2mo ago> Basically you built a miniature, integrated, embedded, open-source web browser which can parse CSS and render to SDL... very impressive!: Modern LLMs are indeed impressive.
- ovenpasta 2mo agoThanks! The real work is done in the Adi2 widget engine. Take a look at: https://github.com/ovenpasta/adi2/blob/master/src/adi-widget.adb https://github.com/ovenpasta/adi2/blob/master/src/adi-widget... https://github.com/ovenpasta/adi2/blob/master/src/adi-layout_util.adb https://github.com/ovenpasta/adi2/blob/master/src/adi-layout... https://github.com/ovenpasta/adi2/blob/master/src/adi-css_styles.ads https://github.com/ovenpasta/adi2/blob/master/src/adi-css_st... Regarding Pascal... yes you would need to rewrite everything I guess, Ada looks similar but it is quite different. Welcome!
- etrez 2mo agoThe absence of {$IFDEF} is one of the best features of Ada (from a long time Pascal (and its multitude of dialects) programmer.