Mobile Smalltalk

04 May 2013

Peter Fisk has announced Mobile Smalltalk, a direct descendent of QuickSilver Smalltalk which was mentioned in this entry I posted two years ago.

Tags: Javascript, MobileSmalltalk, Quicksilver Smalltalk

Jtalk and QuickSilver Smalltalk

19 Mar 2011

Update 26 Jun 2022: This site is retooling, as such some Javascript files are not being served and this post's demonstration has been disabled.

Jtalk is an implementation of Smalltalk in Javascript recently announced by Nicolas Petton.

This is placeholder text. You will see this text if you're reading this post from the blog's main page or RSS feed. Go on, click on the post's title to see Jtalk in action.


If you see a "Hello World" message in the above paragraph, you're seeing Jtalk in action. The HTML head contains this line:

<script type="application/javascript" src="/SmdwHelloWorld.js">

SmdwHelloWorld is a Smalltalk class written in the Jtalk IDE, then saved into the above file in its "compiled" Javascript form.

The HTML body source for the Hello World paragraph looks like this:

<div id="jtalk_do_it">
<p>This is placeholder text. You will see this text if you're reading this
post from the blog's main page or RSS feed.  Go on, click on the post's
title to see Jtalk in action.</p>
</div>

<script type="application/javascript">
smalltalk.init(smalltalk.SmdwHelloWorld);
jQuery(document).ready(function() 
{"#jtalk_do_it"._asJQuery()._contents_(smalltalk.SmdwHelloWorld._new())});
</script>

Not surprisingly, SmdwHelloWorld's renderOn: method looks thusly:

renderOn: html
    html p with: 'Hello, world! This paragraph is rendered by Jtalk.'.

QuickSilver Smalltalk is also an implementation of Smalltalk in Javascript. It is written by Peter Fisk.

Seems lots of Smalltalkers don't read Planet Smalltalk. The aggregator has been syndicating Peter Fisk's description of QuickSilver Smalltalk for some time, but many pharo-project readers don't seem to know about it, judging by the reaction on that mailing list to the announcement of Jtalk.

Tags: Amber, Javascript, Jtalk, Quicksilver Smalltalk

Smalltalk Syntax Highlighting

06 Mar 2011

There are several ways to do Smalltalk code syntax highlighting on a web page. Pier has Pier-Shout, found on Lukas Renggli's Monticello repository. For browser-side highlighting, there are Alex Gorbatchev's Syntax Highlighter and Software Maniacs' highlight.js.

This site is using highlight.js. It is loaded in my Smalltalk rendering code thusly:

html script source: '/highlight.pack.js'; 
    type: 'application/javascript'; 
    with: [].
html script type: 'application/javascript';
    text: 'hljs.initHighlightingOnLoad()'.
Tags: Javascript