vygr/ChrysaLisp

A browser for ChrysaLisp pages.

paul-hammant opened this issue · 10 comments

Ref: https://paulhammant.com/ui-markup-nirvana/

OK, so I've tried to make a non-HTML browser myself :

  1. in 2001 with Swing UIs in XML form via the long deleted "Long Term persistence for Java beans")
  2. Groovy's Builders for Swing (2005). Nice pseudo-declarative language, then they deleted their true interpreter

Then I got involved with other's people's techs towards a non-HTML browser:

  1. JRuby and Swing - "Swiby" by @jeanlazarou (2007)
  2. Shooes - Matz-Ruby and WxWindows (2007). By 'WhyTheLuckyStiff' before he disappeared.

Swiby had a neat CSS-alike implemented in Ruby that was very elegant.

I stopped there for actual work towards this goal, but QML (Qt's pseudo-declarative markup language) would been a decent tech for the same idea, but there's a number of problems with the technology, license and marketing, so it's ultimately unsuitable. Note this blog entry talks of a calculator being a good single-script example for the tech. Something you've naturally aced with calculator/app.lisp. Totally aced.

Google's Flutter could be THE pseudo-declarative winner for the nest 20 years. It's verbose though and idioms are unnatural. Their Fuchsia could be the OS winner, too. Their stuff has a heavy compilation path for now. Much more so that ChrysaLisp. It would not lend itself to a page-by-page model. I was CTO of a new bank that picked Flutter for the phone app (full disclosure).

Apps that were a series of ChrysaLisp pages in a frame would be suitable for other users of ChrysaLisp. If Chrome/Firefox people wanted to browse to the same mime-types, they'd need a plugin that would be developed separately/secondarily. The primary deliverable is something you'd do regardless of others yelling Flash, Applets, etc. IMO.

Anyway, with a HTTP client that can do all the verbs of HTTP, one could make a browser quite easily. Web1.0 would be what you target first - fairly easy. Whatever in-page adaptive or post-load stuff makes sense would be the Lisp negation of the JavaScript solution for DOM-based browsers. I wrote a Web 3.0 blog entry in 2007. Others wrote Web 3.0 articles too around the same time - with different topics. While the idea would be quick to make, it would be a toy only without a sandbox. I link back to #260 at this moment as this would use it.

Lastly - what are the chances I'd be able to build & run ChrysaLisp on my Meizu Pro5 Ubuntu phone ?

vygr commented

I do have a crude doc viewer app currently that displays the limited set of markdown.md files in the docs folder.

I'd certainly like somthing better, but a full on WebBrowser would end up being massive to support all the stuff they use.

But I could see a very nice system that was quite compact around the idea of an extended markdown with Jupiter notebook style Lisp embedded sections.....

Maybe section tags just say witch app/class to start and give the section data to etc ?

vygr commented

Good chance you can get ChrysaLisp onto the phone or even a Pine64 Linux phone etc

From 12 year back: https://www.youtube.com/watch?v=mVrtdKOesVQ

  • Initially the description of a JQuery using "mailbox" fronend for a SpringBoot-like Java backend.
  • 2m 20s: A colleague (Vijay Jambu) demos and talks through the C-Ruby an Shooes web experience. At 5:30 a look at the Java-side sending a list that's compatible with Ruby's hashes instead of JSON for the older DOM app.
  • 6m: Us talking about Jean Lazarou's creation of the same for JRuby+Swing (his Swiby tech).

You know, if the crude markdown doc viewer were teased out into a separate repo gained an over-HTTP capability with a follow hyperlinks addition (and crude back button), then he community could do the work here. Oh and #260 :) In terminal: clbrowse http://domain/page.lisp using a system setting to pick the community app to launch into this Lisp page browser.

The Jupiter notebooks direction would be great too.

Jesktop again (no sandbox feature by the time I stopped working on it 15 years back) - I picked up two DOM browsers that other people had made - HorstScape and Xbrowser. Meaning - these things are going to come anyway, when enough people get the excitement for them. And a Lisp browser is an order easier to get to a certain level of completion that a HTML+JS browser. Maybe two orders.

vygr commented

I pushed a new version on the simple docs app. This now has dynamically loaded modules for each doc section type ! Which means it easy to add new handlers. I also added simple word wrapping to the :text section handler while changing things around.

Nice - facilitating commits :)

Some reference comments
Keep all system files related to any runtime on Chrysalisp in one file format, even in browser app.
I think it will keep system as simple as possible and reduce parser resource cost on the system.
https://en.wikipedia.org/wiki/SXML

vygr commented

I've adopted a md file with sections style.

That now gives us Lisp style Jupiter docs.

Check out the latest widgets.md !

Fantastic. This file https://github.com/vygr/ChrysaLisp/blob/master/docs/gui/widgets.md ?

Page by Page with hyperlinks? Parsed, a DOM constructed, then rendered with callbacks for interactions? Or interpreted direct into a context that's sandboxed somehow. Back, forward, reload buttons, as TBL's original www work?

I rebuilt ChrysaLisp and launched, and can't see a new item in Launcher.

Pre-web, but Denny Bollay's original interface builder has been mentioned before - https://paulhammant.com/2013/03/28/interface-builders-alternative-lisp-timeline :)

vygr commented

What would you do if I wrote a full browser ?

Well, there it is !

It's be fantastic. HTML and JS are ugly bedfellows, and I'd hope you ignore them* as it is Lisp page markup, with Lisp event-hooked logic (etc) that I'm after. Page by page in the web 1.0 style, being the initial deliverable. And in a sandbox of course.

  • leave HTML & JS for a team transpiring Firefox to your lowest level language.