HyperCard Mailing List

[HC] xTalk -> javascript converter
(Msg 1 of 22)
dannygelder <dannygelder@[redacted].com>
Tuesday, 21-Jul-2015 01:47 GMT
I know most of the list won't care 'bout this, but I rewrote my old HTML5 attempt to bring some life back to hypertalk. It went sideways a few times, but still managed to produce an environment where, e.g., I can produce scriptable buttons and fields in a web page with HTML tags, or even a stack-background-card in tags.


Hope yahoo lets me link it: it's http://hypervariety.com/stack http://hypervariety.com/stack.


http://hypervariety.com/stack

http://hypervariety.com/stack http://hypervariety.com/stack Hypervariety Start What is it? Welcome Walkthrough Tags Markup used Links Web boot camp Paint Make pictures Stack Remember Hypercard? Parsers...



View on hypervariety.com http://hypervariety.com/stack
Preview by Yahoo




Dan
[HC] xTalk -> javascript converter
(Msg 2 of 22)
beckiergb <beckiergb@[redacted].com>
Tuesday, 21-Jul-2015 04:24 GMT
As the years go by, more and more I find myself believing that the Web
itself is the one true successor to HyperCard. Perhaps it is because, of
all modern technologies, nothing beats its ease of development and backward
compatibility. You can't run MacPaint on OS X Yosemite, but you can load
http://info.cern.ch/hypertext/WWW/TheProject.html in every browser there
is. The only feature of the Web that has ever been broken in the name of
progress is the blink tag. Or perhaps it is because the flat design of the
most recent web applications so closely resembles HyperCard's.

Not so long ago, I myself implemented on the Web the two most memorable
features of HyperCard that I have yet to see implemented anywhere else
(other than other xCards). I'm not sure why I never shared them with this
list, but HyperVariety has inspired me to finally do so.

jsChunkEx is a JavaScript implementation of HyperTalk's chunk expressions
(char, word, item, line):
http://www.kreativekorp.com/lib/jsChunkEx/

jsPlayCommand is a JavaScript implementation of HyperTalk's scripted music
notation (the "play" command), using the Web MIDI API or exporting to a
MIDI file:
http://www.kreativekorp.com/lib/jsPlayCommand/

If I ever worked up the desire to make yet another attempt to clone
HyperCard one day, I would do it on the Web.
[HC] xTalk -> javascript converter
(Msg 3 of 22)
Witness.of.TeachText <Witness.of.TeachText@[redacted].net>
Tuesday, 21-Jul-2015 10:44 GMT
On 21 Jul 2015, at 06:24, Rebecca Bettencourt beckiergb@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:
> If I ever worked up the desire to make yet another attempt to clone HyperCard one day, I would do it on the Web.

IMO that's probably the best platform to do it on. That said, I'm not a fan of actual web development, I just don't find it a fun thing to do, hence me not working on something like that.
[HC] xTalk -> javascript converter
(Msg 4 of 22)
dannygelder <dannygelder@[redacted].com>
Tuesday, 21-Jul-2015 20:04 GMT
I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into your JS library style. It took less than an hour (really).

http://hypervariety.com/kk_chunks


Dan

[HC] xTalk -> javascript converter
(Msg 5 of 22)
andrewferguson500 <andrewferguson500@[redacted].com>
Tuesday, 21-Jul-2015 20:49 GMT
I would like to thank both Dan and Rebecca for all the work they have put
into these tools (and all the other tools, e.g: Serf / OpenXION). The
creativity from this community despite HyperCard being removed from sale
more than a decade ago never stops amazing me. I am glad the the spirit of
HyperCard - if not HyperCard itself - is still alive and well.

Andrew

On 21 July 2015 at 21:04, dannygelder@[redacted].com[HyperCard] <
HyperCard-Mailing-List> wrote:

>
>
> I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into
> your JS library style. It took less than an hour (really).
>
> http://hypervariety.com/kk_chunks
>
> Dan
>
>
>
[HC] xTalk -> javascript converter
(Msg 6 of 22)
DunbarX <DunbarX@[redacted].com>
Tuesday, 21-Jul-2015 22:12 GMT
...."I would like to thank both Dan and Rebecca...


Me too. There has been more conversation, never mind startling new tools, about HC in this thread than has occurred in the last handful of years. I still use and code in HC all the time for much legacy software, though LiveCode has supplanted it for most new stuff.


But not all.


Craig Newman



-----Original Message-----
From: Andrew Ferguson andrewferguson500@[redacted].com[HyperCard] <HyperCard-Mailing-List>
To: HyperCard Mailing List <HyperCard-Mailing-List>
Sent: Tue, Jul 21, 2015 4:49 pm
Subject: Re: [HC] xTalk -> javascript converter







I would like to thank both Dan and Rebecca for all the work they have put into these tools (and all the other tools, e.g: Serf / OpenXION). The creativity from this community despite HyperCard being removed from sale more than a decade ago never stops amazing me. I am glad the the spirit of HyperCard - if not HyperCard itself - is still alive and well.



Andrew






On 21 July 2015 at 21:04, dannygelder@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:






I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into your JS library style. It took less than an hour (really).




http://hypervariety.com/kk_chunks




Dan


















[HC] xTalk -> javascript converter
(Msg 7 of 22)
joncooper <joncooper@[redacted].au>
Wednesday, 22-Jul-2015 00:19 GMT
Hi Dan,

Thanks also for that tool. I also liked the sample text you used: the prophecy, quoted by Mr Beaver, in The Lion, the Witch and the Wardrobe.

Regards,
Jonathan

Jonathan Cooper
www.doctordada.com
joncooper@[redacted].netau

On 22/07/2015, at 6:04 AM, dannygelder@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:

> I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into your JS library style. It took less than an hour (really).
>
> http://hypervariety.com/kk_chunks
>
> Dan
[HC] xTalk -> javascript converter
(Msg 8 of 22)
beckiergb <beckiergb@[redacted].com>
Wednesday, 22-Jul-2015 02:54 GMT
Awesome. You can specify the entire chunk expression hierarchy in a single
command, though. Instead of:

jsChunkEx.getChunk(jsChunkEx.getChunk(Events.Get('#text','value'),jsChunkEx..LINE,3),jsChunkEx.WORD,3)

you can do:

jsChunkEx.getChunk(Events.Get('#text','value'),jsChunkEx.LINE,3,jsChunkEx.WORD,3)

which is faster and makes it much easier to do things like deleting and
replacing.

Of course, I have to add in my thanks to Dan as well. :)

-- Rebecca Bettencourt


On Tue, Jul 21, 2015 at 1:04 PM, dannygelder@[redacted].com[HyperCard] <
HyperCard-Mailing-List> wrote:

>
>
> I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into
> your JS library style. It took less than an hour (really).
>
> http://hypervariety.com/kk_chunks
>
> Dan
>
>
>
[HC] xTalk -> javascript converter
(Msg 9 of 22)
eric.engle <eric.engle@[redacted].com>
Wednesday, 22-Jul-2015 14:51 GMT
Thank you so much for writing this it's really wonderful!

What I would really like is a parser, specifically a form field, a submit button, and another form field and a third form field: in form field one you put hypertalk syntax, in form field two you get the javascript translation, and in form field three you get whatever the function in form field one returns.

I just don't have time / space / energy to write that: it's more effective if I write about human rights law, in terms of my knowledge etc.
So if either of you would I would be so grateful!


[HC] xTalk -> javascript converter
(Msg 10 of 22)
jplam <jplam@[redacted].com>
Wednesday, 22-Jul-2015 16:06 GMT
Kudos to Rebecca & Danny!!!! Thanks!
[HC] xTalk -> javascript converter
(Msg 11 of 22)
dannygelder <dannygelder@[redacted].com>
Wednesday, 22-Jul-2015 18:20 GMT
Rebecca,

Good news & bad: I updated my page to use much more of your library, but I think it's revealed some bugs in it (or I'm just misusing your API). My page links directly to the .js on your site, so if you feel like hobbying around this weekend... :) and if not, we'll understand. I have these buttons on my page:


<button>char 1 to 2 of word 2 of "ABC DEF"</button>
<button>the number of words in line 2 of text</button>
<button>first to any word in text</button>
<button>delete any word in line 3 of text</button>
<button>put "!!!" after the first sentence of text</button>
<button>put "The Danman" into word "Aslan" of text</button>



Dan


http://hypervariety.com/kk_chunks http://hypervariety.com/kk_chunks

http://hypervariety.com/kk_chunks

http://hypervariety.com/kk_chunks http://hypervariety.com/kk_chunks Hypervariety Start What is it? Welcome Walkthrough Tags Markup used Links Web boot camp Paint Make pictures Stack Remember Hypercard? Parsers...



View on hypervariety.com http://hypervariety.com/kk_chunks
Preview by Yahoo









---In HyperCard-Mailing-List, <beckiergb@...> wrote :

Awesome. You can specify the entire chunk expression hierarchy in a single command, though. Instead of:

jsChunkEx.getChunk(jsChunkEx.getChunk(Events.Get('#text','value'),jsChunkEx.LINE,3),jsChunkEx.WORD,3)


you can do:


jsChunkEx.getChunk(Events.Get('#text','value'),jsChunkEx.LINE,3,jsChunkEx.WORD,3)



which is faster and makes it much easier to do things like deleting and replacing.


Of course, I have to add in my thanks to Dan as well. :)

-- Rebecca Bettencourt




On Tue, Jul 21, 2015 at 1:04 PM, dannygelder@... mailto:dannygelder@... [HyperCard] <HyperCard-Mailing-List mailto:HyperCard-Mailing-List> wrote:
I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into your JS library style. It took less than an hour (really).


http://hypervariety.com/kk_chunks http://hypervariety.com/kk_chunks


Dan














[HC] xTalk -> javascript converter
(Msg 12 of 22)
beckiergb <beckiergb@[redacted].com>
Thursday, 23-Jul-2015 02:33 GMT
Try clearing your cache. There was a bug that I discovered and fixed not
too long ago. ;)


-- Rebecca Bettencourt

On Wed, Jul 22, 2015 at 11:20 AM, dannygelder@[redacted].com[HyperCard] <
HyperCard-Mailing-List> wrote:

>
>
> Rebecca,
>
> Good news & bad: I updated my page to use much more of your library, but I
> think it's revealed some bugs in it (or I'm just misusing your API). My
> page links directly to the .js on your site, so if you feel like hobbying
> around this weekend... :) and if not, we'll understand. I have these
> buttons on my page:
>
> <button>char 1 to 2 of word 2 of "ABC DEF"</button>
> <button>the number of words in line 2 of text</button>
> <button>first to any word in text</button>
> <button>delete any word in line 3 of text</button>
> <button>put "!!!" after the first sentence of text</button>
> <button>put "The Danman" into word "Aslan" of text</button>
>
> Dan
>
> http://hypervariety.com/kk_chunks
> [image: image] <http://hypervariety.com/kk_chunks>;
> http://hypervariety.com/kk_chunks
> Hypervariety Start What is it? Welcome Walkthrough Tags Markup used Links
> Web boot camp Paint Make pictures Stack Remember Hypercard? Parsers...
> View on hypervariety.com <http://hypervariety.com/kk_chunks>;
> Preview by Yahoo
>
>
>
>
> ---In HyperCard-Mailing-List, <beckiergb@...> wrote :
>
> Awesome. You can specify the entire chunk expression hierarchy in a single
> command, though. Instead of:
>
>
> jsChunkEx.getChunk(jsChunkEx.getChunk(Events.Get('#text','value'),jsChunkEx.LINE,3),jsChunkEx.WORD,3)
>
> you can do:
>
>
> jsChunkEx.getChunk(Events.Get('#text','value'),jsChunkEx.LINE,3,jsChunkEx..WORD,3)
>
> which is faster and makes it much easier to do things like deleting and
> replacing.
>
> Of course, I have to add in my thanks to Dan as well. :)
>
> -- Rebecca Bettencourt
>
>
> On Tue, Jul 21, 2015 at 1:04 PM, dannygelder@... [HyperCard] <
> HyperCard-Mailing-List> wrote:
>
>
>
> I loved jsChunkEx! I put up a page that translates xTalk chunk syntax into
> your JS library style. It took less than an hour (really).
>
> http://hypervariety.com/kk_chunks
>
> Dan
>
>
>
>
[HC] xTalk -> javascript converter
(Msg 13 of 22)
dannygelder <dannygelder@[redacted].com>
Thursday, 23-Jul-2015 03:15 GMT
Worked like a charm, verified no errors on Safari, Firefox, and IE8. (Did you expect your library to ever be tested on IE8? You're quite a coder.)
[HC] xTalk -> javascript converter
(Msg 14 of 22)
beckiergb <beckiergb@[redacted].com>
Thursday, 23-Jul-2015 03:16 GMT
Sweet! :)
On Jul 22, 2015 8:15 PM, "dannygelder@[redacted].com[HyperCard]" <
HyperCard-Mailing-List> wrote:

>
>
> Worked like a charm, verified no errors on Safari, Firefox, and IE8. (Did
> you expect your library to ever be tested on IE8? You're quite a coder.)
>
>
[HC] xTalk -> javascript converter
(Msg 15 of 22)
eric.engle <eric.engle@[redacted].com>
Saturday, 25-Jul-2015 15:07 GMT
Using console and inspector I was able to modify the fields and buttons and it is really impressive. I suppose either or both of you are working on the HTML5 implementation of livecode? :)

It is all VERY impressive!
[HC] xTalk -> javascript converter
(Msg 16 of 22)
dannygelder <dannygelder@[redacted].com>
Saturday, 25-Jul-2015 22:24 GMT
Livecode's strategy is apparently to transcompile everything in their entire C++ codebase into Javascript, libraries and all. I don't know if that will work yet, especially on phones.

Hypervariety just wants to deal with the browser situation in a responsible way. As such it puts up some minor code scaffolding to which I'm always adding improvements as I experiment. I've tossed a lot of previous work because it was awkward on one platform or another. Everything is native HTML elements wherever humanely possible, and when they don't exist, I make some up according to rules I laid down to stay backwards compatible and probably will stay compatible for the next fifty years. HTML's not going to go away.
[HC] xTalk -> javascript converter
(Msg 17 of 22)
eric.engle <eric.engle@[redacted].com>
Saturday, 25-Jul-2015 22:52 GMT
Of course, twenty years ago, an interpreted language (hypertalk) on top of an interpreted language (javascript) would never work.
I think on current desktops it can work. I don't think it needs to work on phones, and might not for anything complex.

Yeah, html is gonna be here for the foreseeable future. Hypertalk was really dead between 199? and 2000 and basically came back from the void, and i agree javascript is here to stay. The cross browser problems of the browser wars have been gone for about ten years. And there are some new things like "getelementsbyid" (syntax?) which make javascript much more like hypertalk.. plus the browser now includes an inspector and console.


[HC] xTalk -> javascript converter
(Msg 18 of 22)
dannygelder <dannygelder@[redacted].com>
Sunday, 26-Jul-2015 02:22 GMT
Oh there's no doubt that modern desktops can do emulation. See James Friend | PCE.js - Classic Mac OS in the Browser https://jamesfriend.com.au/pce-js/

James Friend | PCE.js - Classic Mac OS in the Browser https://jamesfriend.com.au/pce-js/ This is a demo of PCE's classic Macintosh emulation, running System 7.0.1 with MacPaint, MacDraw, and Kid Pix. If you want to try out more apps and games see this demo.



View on jamesfriend.com.au https://jamesfriend.com.au/pce-js/
Preview by Yahoo



But I would not expect that situation to be viable forever and ever like plain text is. Yum, monospace! :-)
[HC] xTalk -> javascript converter
(Msg 19 of 22)
hmauro <hmauro@[redacted].com>
Sunday, 26-Jul-2015 15:04 GMT
This is really cool! (Classic Mac OS in the Browser)
Haroldo


On 25/07/2015, at 23:22, dannygelder@[redacted].com[HyperCard] wrote:

> Oh there's no doubt that modern desktops can do emulation. See James Friend | PCE.js - Classic Mac OS in the Browser
>
> James Friend | PCE.js - Classic Mac OS in the Browser
> This is a demo of PCE's classic Macintosh emulation, running System 7.0.1 with MacPaint, MacDraw, and Kid Pix. If you want to try out more apps and games see this demo.
> View on jamesfriend.com.au
> Preview by Yahoo
>
> But I would not expect that situation to be viable forever and ever like plain text is. Yum, monospace! :-)
>
>



[HC] xTalk -> javascript converter
(Msg 20 of 22)
Witness.of.TeachText <Witness.of.TeachText@[redacted].net>
Monday, 27-Jul-2015 09:59 GMT
On 26 Jul 2015, at 00:52, Eric Engle eric.engle@[redacted].com[HyperCard] <HyperCard-Mailing-List> wrote:
> I don't think it needs to work on phones, and might not for anything complex.

I'd be interested in hearing why you think phones aren't needed. Depending on your definition of "computer", most computers out there these days are smart phones. That's what the masses have and use. Given HyperCard has on several occasions been described as "a software erector set for everyone", it seems kind of the opposite of what I'd expect to ignore the most ubiquitous computer out there in favor of those machines that total nerds like us use.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://stacksmith.org
[HC] xTalk -> javascript converter
(Msg 21 of 22)
eric.engle <eric.engle@[redacted].com>
Monday, 27-Jul-2015 13:00 GMT
I just cannot imagine anyone writing a serious computer program on 12-20 square centimeters without a keyboard. Whatever the compiler compiles will be compiled into javascript, so end users (as opposed to authors) will probably be able to use livecode compiled into javascript just fine. i.e. the type of user on a phone is different.


[HC] xTalk -> javascript converter
(Msg 22 of 22)
dannygelder <dannygelder@[redacted].com>
Wednesday, 29-Jul-2015 23:02 GMT
With respect to the boundaries between "phone" and "laptop", I think the writing's on the wall.
HyperCard® and HyperTalk™ remain trademarks of Apple, Inc.; other trademarked products and terms mentioned in this archive are the property of their respective trademark holders. Individual messages remain the intellectual property of their respective authors.