The intro to Newspeak I am trying to write for myself already exists.

94 views
Skip to first unread message

Milan Zimmermann

unread,
Jul 11, 2021, 6:31:37 PM7/11/21
to Newspeak Programming Language
Well .. just a personal rant .. now I feel silly. Many things I was trying to develop understanding on, are already described!


Not all, and sometimes take a different angle, but this is a great intro.

Now I wonder why I missed it .. I am thinking it probably did not exist 11 or so years ago when I first started to read everything about Newspeak. After, I took a big pause, and when I got back a few months ago, I was skipping it due to it's title, thinking the Squeak version is already irrelevant ...




Gilad Bracha

unread,
Jul 11, 2021, 6:36:00 PM7/11/21
to newspeak...@googlegroups.com
Glad it helps.  I do want to update for the WASM version, but that is still evolving. Maybe after the exemplar based stuff is stable, though I still expect other significant changes.


--
You received this message because you are subscribed to the Google Groups "Newspeak Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to newspeaklangua...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/newspeaklanguage/5b4a79ab-a00c-4544-a8a1-50379066ac4bn%40googlegroups.com.


--
Cheers, Gilad

phil jones

unread,
Jul 12, 2021, 3:05:11 PM7/12/21
to newspeak...@googlegroups.com
Same here.

AFAICT NewSpeak is now more focused on the web version, so a document called "Newspeak on Squeak" isn't obviously my first port of call.

Calling it something like "Newspeak : A Guide for the Perplexed" with a subtitle of "On Squeak and other platforms", would definitely get it past the first line of filters that NS n00bs probably have in place.


Gilad Bracha

unread,
Jul 13, 2021, 1:59:59 AM7/13/21
to newspeak...@googlegroups.com
A fair point.  It may be wise to do a quick cheap edit to the title, and add some caveats up front, to convey that you can get a good sense of how the environment works based on the existing docs, but you must beware that things are still significantly different. Producing an accurate, up to date version is quite a lot of work, and I've been putting off until things stabilize. My guess is that we'll have a  somewhat workable exemplar based interface by early August, and then it might make sense to produce a new (and live!) document.



--
Cheers, Gilad

Milan Zimmermann

unread,
Jul 13, 2021, 2:30:52 AM7/13/21
to newspeak...@googlegroups.com
"and then it might make sense to produce a new (and live!) document."

Teasing - and it was also a future question I was going to ask but did not as I am behind on everything. 

Writing a document in, say, org mode, one can create reasonably live documents with languages supported by org babel.  Which Newspeak is not obviously. I did a long time ago babel ob-dart support, now unused and unupdated, and while I was thinking trying my hand on ob-newspeak support, time is against it. 

If there is a planned way to produce live documents in Newspeak, that would be a big bonus. I am guessing such documetn could be written in Hopscotch, and support, apart from live code and results, things like basic document structure, bold/italics text, headings and links (which is all one needs, really) ? 

thanks


Gilad Bracha

unread,
Jul 13, 2021, 1:02:23 PM7/13/21
to newspeak...@googlegroups.com
Hi Milan,

On Mon, Jul 12, 2021 at 11:30 PM Milan Zimmermann <milan.zi...@gmail.com> wrote:

If there is a planned way to produce live documents in Newspeak, that would be a big bonus. I am guessing such documetn could be written in Hopscotch, and support, apart from live code and results, things like basic document structure, bold/italics text, headings and links (which is all one needs, really) ? 

LIve documents for Newspeak already exist, and there are at least two options to create them, and I hope to add more.


As another example, https://blog.bracha.org/illiterateProgramming/out/illiterateProgramming.html is a live Newspeak document that explains how to create a live document like itself.

Basically, you can create HTML by various means (either directly, or using Madoko as I describe in the document above, or any other way you choose), and integrate Newspeak using divs marked as belonging to specific classes which you make Ampleforth recognize.

Also, take a look at the help sections in the IDE, which embed live Newspeak widgets into HTML documentation.

I do expect to go further and integrate WYSIWYG HTML editing into the IDE at some point.

--
Cheers, Gilad

Gilad Bracha

unread,
Jul 13, 2021, 1:21:00 PM7/13/21
to newspeak...@googlegroups.com
Oh, and for more examples, see these docs for the ShapeRank project:


These describe another language altogether, but the prototype is written in Newspeak, and you can access a version of the IDE from the document. If you were to poke around, you'd see how it's tweaked to show new kinds of widgets (e.g., the ShapeRank evaluator).
--
Cheers, Gilad

Milan Zimmermann

unread,
Jul 13, 2021, 6:47:52 PM7/13/21
to Newspeak Programming Language
Hi Gilad,

(Responding to last 2 responses in one. Also changed the subject)

Thanks for the description and links. 

I had a misunderstanding about this; In the past, I did read both


 (but without any deepeer digging). With the emergence of Newspeak Wasm, I generated an (apparently invalid) impression that Ampleforth is not the way for future Newspeak literate programming, or live documentation. 

Crudely speaking, I was making an assumption that any future live document like that in Newspeak would  be a vfuel file, not an html file. But now I see the ShapeRank document is a vfuel file - is it created as an App in Newspeak, and "deployed"? Yet I see the Madoko CSS, I do not quite "get" how it is all composed. But maybe looking at the Newspeak help  section in the IDE  (as you pointed out) will help me with that. I need to get back to this when relevant.

Currently I document my Newspeak study in org mode , and while I would love to think to switch to a more live version like Ampleforth, I need to avoid any more concurrent learning. I am slow as it is :)  

Having said that, seeing the Ampleforth source in a quick review, maybe there would be a way to instrument the org_mode-to-html converter, to generate the class="evaluator", add the Madoko CSS, and inject the javascript lines, so an Ampleforth html would result. 

ShapeRank is also amazing (not that I am qualified to make an evaluation - the examples remind me of Matlab arrays but I realize it is more than that) Thanks for those ShapeRank  links as well both due to ShapeRank and as example of Newspeak live documents.

Milan







Gilad Bracha

unread,
Jul 13, 2021, 7:30:05 PM7/13/21
to newspeak...@googlegroups.com
Hi Milan,

On Tue, Jul 13, 2021 at 3:47 PM Milan Zimmermann <milan.zi...@gmail.com> wrote:
Hi Gilad,

(Responding to last 2 responses in one. Also changed the subject)

Thanks for the description and links. 

I had a misunderstanding about this; In the past, I did read both


 (but without any deepeer digging). With the emergence of Newspeak Wasm, I generated an (apparently invalid) impression that Ampleforth is not the way for future Newspeak literate programming, or live documentation. 

Crudely speaking, I was making an assumption that any future live document like that in Newspeak would  be a vfuel file, not an html file.

One could generate HTML dynamically from Newspeak. That is what the IDE does for its help sections.
 
But now I see the ShapeRank document is a vfuel file - is it created as an App in Newspeak, and "deployed"? Yet I see the Madoko CSS, I do not quite "get" how it is all composed.

Well, it's pretty ugly right now. You write the text in Madoko, and it produces an HTML file. You add that file to the out/ directory where Newspeak produced your vfuel (which is created from an app that runs the AmpleforthEmbedder while incorporating  the ShapeRank libs).
 
But maybe looking at the Newspeak help  section in the IDE  (as you pointed out) will help me with that. I need to get back to this when relevant.

Currently I document my Newspeak study in org mode , and while I would love to think to switch to a more live version like Ampleforth, I need to avoid any more concurrent learning. I am slow as it is :)  

I once created a live Newspeak presentation with the help of another org-mode fan, Bill Burdick (Bill, if you are listening by any chance, hello!). Bill created a live presentation manager called Lounge, using his own functional language.
It was heavily reliant on org mode.  The presentation is at https://www.youtube.com/watch?v=HW7sqMjTkI0 and discusses live literate programming (which is why it was essential to have a live presentation, rather than a conventional, dead, powerpoint or keynote or Prezi or whatever). The talk includes a demo of Ampleforth, which I captured separately in https://youtu.be/eBuiL6asa5Y.

Alas, it seems Lounge is no longer with us. In any case, it was not quite ready for widespread use.  Madoko also has a presentation mode, but it interacts badly with Ampleforth.


Having said that, seeing the Ampleforth source in a quick review, maybe there would be a way to instrument the org_mode-to-html converter, to generate the class="evaluator", add the Madoko CSS, and inject the javascript lines, so an Ampleforth html would result. 

Ampleforth is not dependent on Madoko. I use Madoko because I wanted LaTeX quality output but that really matters mainly for math. So I imagine you can generate the div classes you want from org mode if that suits you. And of course, you can customize Ampleforth to recognize additional tags easily: look at the method #helpText (say, in ClassPresenter) to see how that works.

ShapeRank is also amazing (not that I am qualified to make an evaluation - the examples remind me of Matlab arrays but I realize it is more than that) Thanks for those ShapeRank  links as well both due to ShapeRank and as example of Newspeak live documents.

Thanks. ShapeRank is in its infancy, but builds on great traditions: above all APL, but also dataflow and reactive programming and adds just a little bit on top.

--
Cheers, Gilad

Milan Zimmermann

unread,
Jul 13, 2021, 9:55:39 PM7/13/21
to Newspeak Programming Language
Hi Gilad, thanks for follow up, a few unimportant notes inline

On Tuesday, 13 July 2021 at 16:30:05 UTC-7 Gilad Bracha wrote:
Hi Milan,

On Tue, Jul 13, 2021 at 3:47 PM Milan Zimmermann <milan.zi...@gmail.com> wrote:
snip 
Crudely speaking, I was making an assumption that any future live document like that in Newspeak would  be a vfuel file, not an html file.
One could generate HTML dynamically from Newspeak. That is what the IDE does for its help sections.

Ah, ok, I will look into the IDE help when time comes :) 
 
But now I see the ShapeRank document is a vfuel file - is it created as an App in Newspeak, and "deployed"? Yet I see the Madoko CSS, I do not quite "get" how it is all composed.

Well, it's pretty ugly right now. You write the text in Madoko, and it produces an HTML file.

ok
You add that file to the out/ directory where Newspeak produced your vfuel

ok  
(which is created from an app that runs the AmpleforthEmbedder while incorporating  the ShapeRank libs).

ok (less clear but nevermind - I suppose the App code is not in Newspeak? - no need to answer, I will ask if I get to looking into this) 
 
But maybe looking at the Newspeak help  section in the IDE  (as you pointed out) will help me with that. I need to get back to this when relevant.

Currently I document my Newspeak study in org mode , and while I would love to think to switch to a more live version like Ampleforth, I need to avoid any more concurrent learning. I am slow as it is :)  

I once created a live Newspeak presentation with the help of another org-mode fan, Bill Burdick (Bill, if you are listening by any chance, hello!). Bill created a live presentation manager called Lounge, using his own functional language.
It was heavily reliant on org mode.  The presentation is at https://www.youtube.com/watch?v=HW7sqMjTkI0 and discusses live literate programming (which is why it was essential to have a live presentation, rather than a conventional, dead, powerpoint or keynote or Prezi or whatever). The talk includes a demo of Ampleforth, which I captured separately in https://youtu.be/eBuiL6asa5Y.

Thanks, I saw the first video at some point past. I should watch again. The second I just quickly watched now. Nice!

I am not sure about Lounge, but I was following his Leisure project for a while


It was very cool running a org syntax based document in emacs,  connected to output in chrome.  

Alas, it seems Lounge is no longer with us. In any case, it was not quite ready for widespread use.  Madoko also has a presentation mode, but it interacts badly with Ampleforth.


Having said that, seeing the Ampleforth source in a quick review, maybe there would be a way to instrument the org_mode-to-html converter, to generate the class="evaluator", add the Madoko CSS, and inject the javascript lines, so an Ampleforth html would result. 

Ampleforth is not dependent on Madoko.

ok 
I use Madoko because I wanted LaTeX quality output but that really matters mainly for math. So I imagine you can generate the div classes you want from org mode if that suits you. And of course, you can customize Ampleforth to recognize additional tags easily: look at the method #helpText (say, in ClassPresenter) to see how that works.

Looking at it now .. so, basically, if I have an HTML string with a <div class='helpButton'>, this code in ClassPresenter>>helpText:  can insert a Hopscotch(?) instance of  HelpButton (assuming HelpButton was implemented) and the HelpButton instance will present itself as Html on that div? 

Hmm, maybe that org-to-ampleforth just got more exciting - but I have to hold myselt. The Newspeak Hello World gallery first :)


ShapeRank is also amazing (not that I am qualified to make an evaluation - the examples remind me of Matlab arrays but I realize it is more than that) Thanks for those ShapeRank  links as well both due to ShapeRank and as example of Newspeak live documents.

Thanks. ShapeRank is in its infancy, but builds on great traditions: above all APL, but also dataflow and reactive programming and adds just a little bit on top.

Does it use on some level APL syntax? I love APL from a 10,000 feet view but never have actually used it. With Tensors everywhere today something like ShapeRank must be a super-welcome innovation. I will follow it as more updates come out

Milan




--
Cheers, Gilad

Gilad Bracha

unread,
Jul 13, 2021, 11:15:55 PM7/13/21
to newspeak...@googlegroups.com
On Tue, Jul 13, 2021 at 6:55 PM Milan Zimmermann <milan.zi...@gmail.com> wrote:
Hi Gilad, thanks for follow up, a few unimportant notes inline

On Tuesday, 13 July 2021 at 16:30:05 UTC-7 Gilad Bracha wrote:

ok (less clear but nevermind - I suppose the App code is not in Newspeak? - no need to answer, I will ask if I get to looking into this) 

The app is in Newspeak. You can access it from the page. Clicking on a Tensor  result will take you to a Newspeak inspector on it, and the IDE is there and you can look for class ShapeRankDemo.

Looking at it now .. so, basically, if I have an HTML string with a <div class='helpButton'>, this code in ClassPresenter>>helpText:  can insert a Hopscotch(?) instance of  HelpButton (assuming HelpButton was implemented) and the HelpButton instance will present itself as Html on that div? 

Pretty much. You need to define the mapping from div classes to Newspeak widgets, as ClassPresenter>>helpText: does for the widgets it uses.

Thanks. ShapeRank is in its infancy, but builds on great traditions: above all APL, but also dataflow and reactive programming and adds just a little bit on top.

Does it use on some level APL syntax?

No, that is a bridge too far. But the rules are quite similar: operations are automatically lifted to multi-dimensional streams (which supercede multi-dimensional arrays).

--
Cheers, Gilad

Milan Zimmermann

unread,
Jul 14, 2021, 1:16:46 AM7/14/21
to Newspeak Programming Language
On Tuesday, 13 July 2021 at 20:15:55 UTC-7 Gilad Bracha wrote:
On Tue, Jul 13, 2021 at 6:55 PM Milan Zimmermann <milan.zi...@gmail.com> wrote:
Hi Gilad, thanks for follow up, a few unimportant notes inline

On Tuesday, 13 July 2021 at 16:30:05 UTC-7 Gilad Bracha wrote:

ok (less clear but nevermind - I suppose the App code is not in Newspeak? - no need to answer, I will ask if I get to looking into this) 

The app is in Newspeak. You can access it from the page. Clicking on a Tensor  result will take you to a Newspeak inspector on it, and the IDE is there and you can look for class ShapeRankDemo.

Ah of course, so obvious, and beautiful. One (I) am not used to get to the sources on a web page apart from save as or going o browser debugger. I got to ShapeRankDemo through the home button,  then sources.

And this looks like publicly available on Github, so one can download the project and run locally(?). Great.
  

Looking at it now .. so, basically, if I have an HTML string with a <div class='helpButton'>, this code in ClassPresenter>>helpText:  can insert a Hopscotch(?) instance of  HelpButton (assuming HelpButton was implemented) and the HelpButton instance will present itself as Html on that div? 

Pretty much. You need to define the mapping from div classes to Newspeak widgets, as ClassPresenter>>helpText: does for the widgets it uses.

Yes.  


Thanks. ShapeRank is in its infancy, but builds on great traditions: above all APL, but also dataflow and reactive programming and adds just a little bit on top.

Does it use on some level APL syntax?

No, that is a bridge too far. But the rules are quite similar: operations are automatically lifted 
to multi-dimensional streams (which supercede multi-dimensional arrays).

I always wondered how multi-dimensional streams work :) - just kidding, never thought of such concept. Sounds elegant!

Thanks for the detail answers (above and beyond) my questions. 

Your work has always been amazing.

Milan

--
Cheers, Gilad
Reply all
Reply to author
Forward
0 new messages