hyperscript

All flavors welcome.
Forum rules
Be kind.
Post Reply
1cg

hyperscript

Post by 1cg »

Hello All,

Not sure if this is the right topic (maybe off topic?) but I thought people here might be interested in scripting language I am working on:

https://hyperscript.org

It is an xCode-style language inspired by my (long ago) experience with HyperTalk, but has a lot of DOM-oriented features:

Code: Select all

  <button _="on click add .highlighted to #div>
     Highlight the div
  </button>
  <div id="div">
    Highlight me!
  </div>
hyperscript is a sister project of another web library I work on: https://htmx.org

Obviously all very raw compared to the Hypercard-derived dev environments we all know and love, but hey, that's the web for you.

Anyway, thought some folks here might be interested.

Mods, I apologize if this was the wrong place to post this.
User avatar
OpenXTalkPaul
Posts: 1537
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: hyperscript

Post by OpenXTalkPaul »

1cg wrote: Mon Dec 20, 2021 2:38 pm Hello All,

Not sure if this is the right topic (maybe off topic?) but I thought people here might be interested in scripting language I am working on:

https://hyperscript.org

It is an xCode-style language inspired by my (long ago) experience with HyperTalk, but has a lot of DOM-oriented features:

Code: Select all

  <button _="on click add .highlighted to #div>
     Highlight the div
  </button>
  <div id="div">
    Highlight me!
  </div>
hyperscript is a sister project of another web library I work on: https://htmx.org

Obviously all very raw compared to the Hypercard-derived dev environments we all know and love, but hey, that's the web for you.

Anyway, thought some folks here might be interested.

Mods, I apologize if this was the wrong place to post this.
Welcome!
YES!!!
I AM very much interested in your _hyperscript (and HTMX too) projects, and in fact I've already posted in this forums about it! I've been thinking it would be cool to be able to take an OXT Stack and run it through a conversion process and produces "stacks" (or equivalent) prepared for an other xTalk (or any other environment really, I mean if someone want to make a converter to Pascal "FORM"s, or whatever).

One reason I find Hyperscript and HTMX very interesting is image in an alternate reality universe this could have been how an xTalk "Web" of interconnected hyper stacks of information could've looked, if Apple had actually worked on making an open standard for xTalk/HyperCard clones just before the first web browser showed up.

I've been working on an "Encapsulated Stack" format, mostly for use as a template system and as q package management format. It's XML based, with embedded binary data (Base64) for resource elements (in place of, or in addition to URL of original binary file). Currently the goal for this is to be able to capture everything about a stack, it GUI Layout, Scripts, Properties, Graphics/Images, Sounds, etc. into this format and then read it back to produce a clone stack. My thinking is that this reading back part, could be a conversion to Hyperscript/HTMX (or anything else suitable). Such a converter would convert OXT "stacks" to "sites", cards -> pages, groups -> div (?). I don't know, just brainstorming, but I know it's doable, I've seen a few stacks around that could convert card layout to HTML.
1cg

Re: hyperscript

Post by 1cg »

Happened on a download of "Revolution: Software At The Speed of Thought" in the forums and decided to take a crack at the Dan Shafer Counter Tutorial in hyperscript:

https://twitter.com/htmx_org/status/1472996063904731143

https://jsfiddle.net/uyfbkws6/6/

Code: Select all

<button _="on click decrement the #val's innerHTML">-</button>
<span id="val">
0
</span>
<button _="on click increment the #val's innerHTML">+</button>
<br/>
<button _="on click put 0 into the #val's innerHTML">
reset
</button>
Not bad looking!
1cg

Re: hyperscript

Post by 1cg »

OpenXTalkPaul wrote: Mon Dec 20, 2021 3:53 pm Welcome!
YES!!!
I AM very much interested in your _hyperscript (and HTMX too) projects, and in fact I've already posted in this forums about it!
Ah, very sorry. Unfortunately I don't have access to search or I would have posted on that thread...
OpenXTalkPaul wrote: Mon Dec 20, 2021 3:53 pm One reason I find Hyperscript and HTMX very interesting is image in an alternate reality universe this could have been how an xTalk "Web" of interconnected hyper stacks of information could've looked, if Apple had actually worked on making an open standard for xTalk/HyperCard clones just before the first web browser showed up.
Absolutely, it was definitely an opportunity missed!
OpenXTalkPaul wrote: Mon Dec 20, 2021 3:53 pm I've been working on an "Encapsulated Stack" format, mostly for use as a template system and as q package management format. It's XML based, with embedded binary data (Base64) for resource elements (in place of, or in addition to URL of original binary file). Currently the goal for this is to be able to capture everything about a stack, it GUI Layout, Scripts, Properties, Graphics/Images, Sounds, etc. into this format and then read it back to produce a clone stack. My thinking is that this reading back part, could be a conversion to Hyperscript/HTMX (or anything else suitable). Such a converter would convert OXT "stacks" to "sites", cards -> pages, groups -> div (?). I don't know, just brainstorming, but I know it's doable, I've seen a few stacks around that could convert card layout to HTML.
The tricky thing is that the glory of HyperCard and descendants was always the all-in-one developer experience, which goes against the grain of the current web development world. I think there is a lot of opportunity there, however, since web development has managed to make itself so darned hard with react and all the front end madness.

Will be interested to watch, and thank you for the warm welcome!
User avatar
OpenXTalkPaul
Posts: 1537
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: hyperscript

Post by OpenXTalkPaul »

1cg wrote: Mon Dec 20, 2021 6:33 pm The tricky thing is that the glory of HyperCard and descendants was always the all-in-one developer experience, which goes against the grain of the current web development world. I think there is a lot of opportunity there, however, since web development has managed to make itself so darned hard with react and all the front end madness.

Will be interested to watch, and thank you for the warm welcome!
I don't know... I think the biggest draw for me, as a teen in the late 1980s, was the instant gratification aspect. Your are working on an app while you are running that app! Some modern dev app engines are just coming back around to this. When I see "Live Reload" advertised as a desirable feature I think 'HyperCard was "Constantly Reloaded" more than three decades ago'!

And the easy to read and understand (even if you aren't good at commenting your work) HyperTalk/xTalk script was/is a no brainer! The idea to use a message queue with a message hierarchy makes total sense for an app engine where things are driven by user generated events. It really made instant sense to me the way it works. And it made sense to a lot of non-programmers... artist, musicians, fans, collectors, kids, etc. Democratized programming by making it so anyone with an idea, with a little work, could produce an app.

And most of all the extensibility... AppleScript, XCMDs/XFCNS / Externals, and now days "Builder Extensions" means hardware level access to the computer (certificates, code signing, entitlements, etc. aside). You can do just about anything with it! As a hobbyist musician with a long time interest in MIDI (Music Instrument Digital Interfaces), hardware accesss is pretty much a requirement for me, and one that can't easily be achieved on the web (of course there is client side Node.js or React Native and the like, but on web with WebMIDI you need a extension to access the hardware).

The names are different, call it an NSView, call it a page or form, or stack/card, but they're all chunks of data / controls displayed in a window or screen. Nothing has really changed all that much, in any real monumental way since the late 80s, if you think about it. Apps are still apps. It doesn't really matter what the underlying app engine is, accept to knowing its limitations.
User avatar
OpenXTalkPaul
Posts: 1537
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: hyperscript

Post by OpenXTalkPaul »

Oh and you should have full user access to this forums now.

BTW, I just remembered I used _hyperscript webpage (along with WebCard, JS hyper clone) as examples for the web view widget in OXT. Some cross-promoting!

Personally I haven't done any significant webdev since the mid 1990s (HTML2!), but maybe I dig out my Tarantula HTML editor and turn it into an authoring tool for HS/HTMX...just a thought, I'm open to anything xTalk!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests