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
http://www.youtube.com/watch?v=IUBjrDYIysY&feature=youtu.be&a

ProgressGrid
http://www.youtube.com/watch?v=EpySCk8bVT4&feature=youtu.be&a

Introduction to Smalltalk
http://live.exept.de/doc/books/JoyOfST/IntroToST.html

Porting from VisualWorks to Squeak
http://scg.unibe.ch/wiki/howtos/portingfromvisualworkstosqueak

Namespaces (Was: MNU in tools after loading parcel)
http://forum.world.st/Namespaces-Was-MNU-in-tools-after-loading-parcel-td3160938.html

The System Browser 101
http://www.cincomsmalltalk.com/tutorials/version7/tutorial1/weblogstats7.htm

Building the VM – Second Part
http://marianopeck.wordpress.com/2011/04/16/building-the-vm-second-part/

Building the VM from scratch using Git and CMakeVMMaker
http://marianopeck.wordpress.com/2011/04/10/building-the-vm-from-scratch-using-git-and-cmakevmmaker/

Mac Squeak VM
http://smallworks.com.ar/products/vm

Reef is a framework to manage dynamic web components for Seaside
http://association.pharo.org/

Project Renaissance: Harness Emergence
http://soft.vub.ac.be/~smarr/renaissance/

Sly and the RoarVM: Exploring the Manycore Future of Programming
http://soft.vub.ac.be/~smarr/2012/11/sly-and-the-roarvm-exploring-the-manycore-future-of-programming-2/

tode
http://code.google.com/p/tode/
tODE – the Object (centric) Development Environment

Byte Magazine Volume 06 Number 08 – Smalltalk (August 1981)
http://archive.org/details/byte-magazine-1981-08

Dale Henrich’s GitHub Repositories
http://dalehenrich.github.com/

Videos Smalltalks 2010
Inline caching (Part 1) by Eliot Miranda
http://www.fast.org.ar/smalltalks2010/videos/Inline%20caching

Videos Smalltalks 2010
Code generation (Part 1) by Eliot Miranda
http://www.fast.org.ar/smalltalks2010/videos/Code%20generation

Smalltalk is cool
http://astares.blogspot.com.ar/2012/11/smalltalk-is-cool.html

Do object-oriented programming languages exist that are not class-based?
http://programmers.stackexchange.com/questions/115418/do-object-oriented-programming-languages-exist-that-are-not-class-based

DBXTalk
http://dbxtalk.smallworks.com.ar/tools

Smalltalk Tutorial
http://smalltalktutorial.herokuapp.com/

Roassal
http://www.slideshare.net/bergel/roassal-presentation
Turn your programming environment into a beauty center for objects

MicroSeeker Screenshots
http://www.huv.com/uSeeker/smalltalk/screenshots.html

Underwater Vehicles: MicroSeeker
http://www.huv.com/uSeeker/index.html

The Mist Project
http://mist-project.org/
There is no “C” in “Smalltalk”

What If: Developing Applications in the Multicore Era
http://soft.vub.ac.be/~smarr/2012/11/what-if-developing-applications-in-the-multicore-era/

Jugando con Comet en Squeak
http://diegogomezdeck.blogspot.com.ar/search?q=comet

Monticello
http://wiresong.ca/monticello/
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
http://www.jarober.com/blog/blogView?entry=3529487736

My Links
http://delicious.com/ajlopez/smalltalk

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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:

https://github.com/ajlopez/CobolScript/tree/master/samples/template

The code:

<#
data division.
working-storage section.
01 n.

procedure division.
#>
Factorial
---------

<#
perform show-factorial varying n from 1 to 10.

show-factorial.
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:

Factorial
---------

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

http://www.ajlopez.com

http://twitter.com/ajlopez

Smalltalk: Links, News And Resources (8)

Previous Post
Next Post

Seaside + jQuery Mobile
http://jquerymobile.seasidehosting.st/

Comas
http://cormas.cirad.fr/en/outil/presentation/
Agent-based simulations

StepTalk
http://en.wikipedia.org/wiki/StepTalk
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.

thiscontext
http://thiscontext.wordpress.com/

Spoon 3 beta 2 (“Usable By Humans”) released
http://thiscontext.wordpress.com/2012/10/19/spoon-3-beta-2-usable-by-humans-released/
Ladrillos
http://www.squeaksource.com/Ladrillos/
A different way to group different existent packages / classes for specific goal.

Decomposing the Ulam spiral
http://www.lshift.net/blog/2012/09/27/decomposing-the-ulam-spiral

Mist
martinmcclure / mist
https://github.com/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
http://gnuu.org/2009/01/26/seaside-statefulness-call-and-answer/

Seaside without Continuations?
http://joachimtuchel.wordpress.com/2011/04/27/seaside-without-continuations/

Are continuations a key feature in Seaside?
http://stackoverflow.com/questions/8279339/are-continuations-a-key-feature-in-seaside

Seaside: Continuations and Subroutine Calls
http://seaside.gemstone.com/tutorial/chapter07.pdf

Call-with-current-continuation
http://en.wikipedia.org/wiki/Call-with-current-continuation

Tumbleweed
http://pgregory.github.com/tumbleweed/
A lightweight, image based, encapsulated development environment based around Smalltalk, specifically, “A Little Smalltalk” version 3.0 by Timothy A. Budd

LittleSmallscript
http://ympbyc.github.com/LittleSmallscript/
Little Smallscript is a dialect of Smalltalk that compiles into JavaScript.

VA Smalltalk Videos
http://archive.org/search.php?query=VA%20Smalltalk%20AND%20collection%3Aopensource_movies

U8 Newsletter
http://u8.smalltalking.net/newsletter/newsletter.html

LSW Vision Smalltalk & DNG
https://groups.google.com/forum/m/?fromgroups#!topic/comp.lang.smalltalk.dolphin/c-5kV_pKleg

ESUG European Smalltalk User Group 2012 – 20th International Smalltalk Conference
http://www.esug.org/wiki/pier/Conferences/2012

My Links
http://delicious.com/ajlopez/smalltalk

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:

https://github.com/ajlopez/AjTalk/blob/master/Src/AjTalk.Tests/AssertTests/EnvironmentTests.st

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
    instanceVariableNames:''
    classVariableNames:''
    poolDictionaries:''
    category:''
.

[(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

http://www.ajlopez.com

http://twitter.com/ajlopez

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:

https://github.com/ajlopez/CobolScript/blob/master/samples/factorial/factorial.cob

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

http://www.ajlopez.com

http://twitter.com/ajlopez

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

Next Post

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

https://github.com/ajlopez/CobolScript

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

https://github.com/ajlopez/CobolScript/blob/master/samples/hello/hello.cobs

DISPLAY "HELLO, WORLD".

You can run it, executing:

node run hello.cobs

A more complete code:

https://github.com/ajlopez/CobolScript/blob/master/samples/hellopgm/hello.cob

IDENTIFICATION DIVISION.
    PROGRAM-ID. HELLO.
    AUTHOR. A.J.LOPEZ.
    INSTALLATION. TEST.
    DATE-WRITTEN. 2012-12-22.
    DATE-COMPILED. 2012-12-22.
ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
        SOURCE-COMPUTER. NODE.
        OBJECT-COMPUTER. NODE.
DATA DIVISION.
PROCEDURE DIVISION.
    DISPLAY "HELLO, WORLD".

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

http://www.ajlopez.com

http://twitter.com/ajlopez

COBOL: Links, News And Resources (2)

Previous Post

COBOL on Cogs
http://www.coboloncogs.org/INDEX.HTM

Java is becoming the new Cobol
http://www.infoworld.com/d/developer-world/java-becoming-new-cobol-204

IBM Mainframes
http://ibmmainframes.com/manuals.php
Online IBM Reference Manuals

MicroFocus
http://www.microfocus.com/

COBOL
http://en.wikipedia.org/wiki/COBOL

COBOl Tutorials
http://www.mainframetutorials.com/programming/programming.cobol.html

zingCOBOL
http://cobol.404i.com/
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
http://www.mainframegurukul.com/tutorials/programming/cobol/cobol-tutorial.html

COBOL programming – tutorials, lectures, exercises, examples
http://www.csis.ul.ie/cobol/

Compile Online
http://www.compileonline.com/index.php

The SOUL program query language
http://soft.vub.ac.be/SOUL/
Query and inspect your Java, Smalltalk, C and Cobol programs.

When Did That Happen?
http://pragprog.com/magazines/2012-02/when-did-that-happen
Grace Murray Hopper and Automatic Coding

COBOL Reborn
http://it.toolbox.com/blogs/oracle-guide/cobol-reborn-25896
(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
http://sourceforge.net/projects/universalcobol/
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.

COB2J
http://www.mpsinc.com/cob2j.html
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
http://www.veryant.com/products/iscobol/
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
http://delicious.com/ajlopez/cobol