Monthly Archives: December 2012

Smalltalk: Links, News And Resources (9)

Previous Post
Next Post

Building a Business with Cincom Smalltalk™ by Arden Thomas and Dirk Verleysen


Introduction to Smalltalk

Porting from VisualWorks to Squeak

Namespaces (Was: MNU in tools after loading parcel)

The System Browser 101

Building the VM – Second Part

Building the VM from scratch using Git and CMakeVMMaker

Mac Squeak VM

Reef is a framework to manage dynamic web components for Seaside

Project Renaissance: Harness Emergence

Sly and the RoarVM: Exploring the Manycore Future of Programming

tODE – the Object (centric) Development Environment

Byte Magazine Volume 06 Number 08 – Smalltalk (August 1981)

Dale Henrich’s GitHub Repositories

Videos Smalltalks 2010
Inline caching (Part 1) by Eliot Miranda

Videos Smalltalks 2010
Code generation (Part 1) by Eliot Miranda

Smalltalk is cool

Do object-oriented programming languages exist that are not class-based?


Smalltalk Tutorial

Turn your programming environment into a beauty center for objects

MicroSeeker Screenshots

Underwater Vehicles: MicroSeeker

The Mist Project
There is no “C” in “Smalltalk”

What If: Developing Applications in the Multicore Era

Jugando con Comet en Squeak

Monticello is a distributed optimistic concurrent versioning system for Squeak code. It was written by Avi Bryant and Colin Putney, with contributions from many members of the Squeak community.

IM 101: Object Memory Management in VisualWorks

My Links

Keep tuned!

Angel “Java” Lopez

CobolScript (3) Templates

Previous Post
Next Post

I like to have a template engine in my languages, so, I added one in my open source CobolScript, COBOL compiler to JavaScript. The first sample:

The code:

data division.
working-storage section.
01 n.

procedure division.

perform show-factorial varying n from 1 to 10.

local result.
perform factorial using n giving result.
${n}!= ${result}
factorial using n.
local m.
if n = 1 then return n.
subtract 1 from n giving m.
perform factorial using m giving m.
multiply n by m.
return m.

The template file is compiled to COBOL transforming every text to DISPLAY … WITH NO ADVANCING (the new lines are already in the text). The code between <# and #> is copy as is to the COBOL program. Every expression between ${ and } is expanded as another parameter to a DISPLAY command. Then, after compiling all the texto to COBOL, CobolScript compile it to JavaScript. The template syntax is a kind of syntax-sugar.

The output of the program:


1!= 1
2!= 2
3!= 6
4!= 24
5!= 120
6!= 720
7!= 5040
8!= 40320
9!= 362880
10!= 3628800

I could use the template support to generate text files, that is, to implement code generation in CobolScript, as I did in AjGenesis (classic, Ruby, Node.js). I already have a dynamic web page implementation based on this template engine (yes, dynamic web pages in CobolScript ;-). But that is a topic for another post.

Keep tuned!

Angel “Java” Lopez

Smalltalk: Links, News And Resources (8)

Previous Post
Next Post

Seaside + jQuery Mobile

Agent-based simulations

StepTalk is the official GNUstep scripting framework that represents separate scriptable servers or applications as a single object environment. It is meant to be independent of the programming language used; its default language is Smalltalk on top of the Objective-C runtime.


Spoon 3 beta 2 (“Usable By Humans”) released
A different way to group different existent packages / classes for specific goal.

Decomposing the Ulam spiral

martinmcclure / mist
Mist is a project to create a Smalltalk variant that is implemented without a virtual machine, is implemented without depending on any other language, is simple, consistent, and is reasonably fast.

Seaside Statefulness: Call-and-Answer

Seaside without Continuations?

Are continuations a key feature in Seaside?

Seaside: Continuations and Subroutine Calls


A lightweight, image based, encapsulated development environment based around Smalltalk, specifically, “A Little Smalltalk” version 3.0 by Timothy A. Budd

Little Smallscript is a dialect of Smalltalk that compiles into JavaScript.

VA Smalltalk Videos

U8 Newsletter

LSW Vision Smalltalk & DNG!topic/comp.lang.smalltalk.dolphin/c-5kV_pKleg

ESUG European Smalltalk User Group 2012 – 20th International Smalltalk Conference

My Links

AjTalk in C# (3) Environments

Previous Post
Next Post

Some weeks ago, I added environments to my open source AjTalk Smalltalk Virtual Machine, C# version. What is an environment, in my jargon? It’s a dictionary for named artifacts, like classes. Smalltalk global is a classical environment. But I want to add support of other named environments, to avoid class name collisions. Usually, classic Smalltalk have pool dictionaries, but I want something more dynamic. Then, I added Environment, see my tests:

At first, Smalltalk is the current environment:

"Current environment is Smalltalk"
[Environment current == Smalltalk] assert.

You can create new environments:

env := Environment new: #MyEnvironment.

Automatically, the new environment is registered/added to the current one, in this case, Smalltalk:

"The new environment was defined as global at Smalltalk"

[(Smalltalk at: #MyEnvironment) isNil not] assert.
[(Smalltalk at: #MyEnvironment) == MyEnvironment] assert.
[(Smalltalk at: #MyEnvironment) == env] assert.

[MyEnvironment isNil not] assert.
[MyEnvironment == env] assert.

Every new Environment has an entry to Smalltalk:

"Dotted expression syntax sugar for MyEnvironment at: #Smalltalk"

[MyEnvironment.Smalltalk == Smalltalk] assert.

You can switch to a new environment:

env setCurrent.

"Current environment check"

[Environment current == env] assert.
[Environment current == Smalltalk.MyEnvironment] assert.

And then, this is the key feature, the class definitions define a new class AT CURRENT environment:

"Define a class at current env environment, no change to syntax"

Object subclass:#MyClass

[(env at: #MyClass) isNil not] assert.
[(Smalltalk at: #MyClass) isNil] assert.

Orthogonally to environments, I implemented modules: a way to search and load file outs, and running them at a new environment (similar to Python import, or (more or less) to Node.js/CommonJS require). But this is a topic for another post 😉

Keep tuned!

Angel “Java” Lopez

CobolScript (2) First Factorial Function

Previous Post
Next Post

JavaScript is butter in my hands ;-). I was working on CobolScript, my COBOL compiler to JavaScript.

I added the support for user-defined functions, parameters, arguments and local variables. The first example, factorial:

You can run it, executing command line in that folder:

node run factorial.cob

data division.
working-storage section.
01 n.

procedure division.
perform show-factorial varying n from 1 to 10.

show-factorial local result.
perform factorial using n giving result.
display n "! = " result.

factorial using n local m.
if n = 1 then return n.
subtract 1 from n giving m.
perform factorial using m giving m.
multiply n by m.
return m.

The new syntax features:

performusing … You can call a local procedure passing arguments.

– <proc> using …  The procedure declares its arguments.

– <proc> local(s) … The procedure declares its local variables.

performgiving <var>…  You can specify that a perform has a return value, to be saved in one or more variables.

return (expr)  The procedure can return at any point. A return value could be specified.

I just added web page support, but that is a topic for another post 😉

Keep tuned!

Angel “Java” Lopez

CobolScript (1) COBOL compiler to JavaScript/Node.js

Next Post

Today, I started a new project at my Github account:

It’s a compiler from COBOL to JavaScript. It’s work in progress, but the Hello, world is running:


You can run it, executing:

node run hello.cobs

A more complete code:

    DATE-WRITTEN. 2012-12-22.
    DATE-COMPILED. 2012-12-22.

Let’s run it executing:

node run hello.cob

My work was written using TDD (Test-Driven Development). I shoudl add a lot of things: picture support, working storage section, file section, and maybe, SQL execute commands. But it’s a good starting point. It can run on browser and on Node.js.

Keep tuned!

Angel “Java” Lopez

COBOL: Links, News And Resources (2)

Previous Post

COBOL on Cogs

Java is becoming the new Cobol

IBM Mainframes
Online IBM Reference Manuals



COBOl Tutorials

The aim of this COBOL tutorial site is to give the basics of the COBOL programming language for anyone who knows a little bit about computers (not much) and preferably will at least have come across another procedural progamming language such as C, QBASIC or Pascal.

COBOL Programming Tutorial

COBOL programming – tutorials, lectures, exercises, examples

Compile Online

The SOUL program query language
Query and inspect your Java, Smalltalk, C and Cobol programs.

When Did That Happen?
Grace Murray Hopper and Automatic Coding

COBOL Reborn
(2005) "COBOL is like an invisible giant. There’s reported to be 180 billion-200 billion lines of code out there, processing 75% of commercial business. Few companies are keen to throw away the hundreds or thousands of man-years that have been invested in mature, high-performance COBOL code. Instead, they are integrating and building bridges between COBOL, .NET and J2EE [Java 2 Platform, Enterprise Edition], using service-oriented architectures to preserve the strengths of the legacy code while benefiting from Web-oriented development tools,"

Universal Cobol Compiler
The Universal COBOL Compiler (UCC) is a Java-based COBOL to Java bytecode cross-compiler. It’s made up of a COBOL compiler, a Java-based COBOL runtime, and a package for manipulating Java class files.

The COB2J® translator is a family of Microsoft Windows cross compiler programming tools that accepts many COBOL source code dialects and translates them to JAVA or J#. The translation process is a simple turn key process with minimal user intervention. The translator output is JAVA or J# code that is ready to be tested with the target compiler. Simply run your COBOL code through the translator and start debugging JAVA code with your target compiler.

isCOBOL Evolve
By compiling COBOL code into Java, isCOBOL software allows your organization to retain and enhance valuable COBOL application and development assets, while taking full advantage of the Java technology platform in deployment.

My Links