Monthly Archives: April 2014

End Of Iteration 2014w17

Previous Post
Next Post


I started a refactorization of this project:

Now, I have a document object with find method to produce a sequence of elements. I want to add filter to this sequence, ie: give me all elements (tags) that are “h1”, or that have such attribute or class. I prefer a code solution (calling methods) instead of having XPath queries. I have the first use cases “in pectore”, to be explored in May.


Every one writes his/her own flow library for JavaScript. Me too! I wrote this library some months ago, and then I switched to implement SimpleAsync. But then I realized the use cases are similar, so I went back to design board and started a new implementation in SimpleFlow:

Now, I have a more clear sequence implementation, with explicit .success and .fail methods. My next steps: implement parallel execution instead of a sequence. And map and reduce apply of a function.


Yes, it’s time to write simple neural networks in JavaScript. I have a threshold neuron implementation. I’m in doubt about the reactive events to fire: most use cases don’t need such features. Check the code and tests at:


I started to add binary serialization of message to AjErl, Erlang in C# project. I started to implement super in AjTalkJs, Smalltalk in JavaScript. I added some events to SimpleValues, a simple model with events. I added the number of workers to use in the constructor of ActorSystem in Aktores, Akka ideas in C#. I wrote a new simple sample for SimpleCards. I worked on three non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez

Angular, Links And Resources (5)

Previous Post
Next Post

Spring Scala

Death to cookies, long live JSON Web Tokens – YouTube

Death to Cookies, Long Live Tokens // Speaker Deck

Anant Narayanan – Building Realtime Apps With Firebase and Angular – NG-Conf 2014 – YouTube

Learn JavaScript Part 3 – AngularJS and Langton’s Ant – CodeProject

Karma – Spectacular Test Runner for Javascript

10 Reasons Web Developers Should Learn Angular – CodeProject

How to Make an Email Web App using Angular – CodeProject

Real-time, multi-user, co-browse tech for web and mobile apps: GoInstant

Implementing a Flowchart with SVG and AngularJS – CodeProject

DI v2 talk Links (ng-conf 2014)


Structuring an Angular Project | John Papa

Cookies vs Tokens. Getting auth right with Angular.JS

Controller in AngularJS

Modular AngularJS NuGet Packages | John Papa

Building a Single Page Application with AngularJS and Neo4J – Setup | a thousand lines of code

Deploying a Yeoman/Angular app to Heroku – SitePoint

Building a Startup Stack with AngularJS

Angular Models

Deconstructing AngularJS Injector | NeverFriday

AngularJS Buenos Aires – 2° Meetup – YouTube

traider is an open source to ecommerce | coded with love (and javascript: nodejs, angularjs and mongodb)

My Links

Keep tuned!

Angel “Java” Lopez

Smalltalk from Scratch

I think Smalltalk is a wonderful technology that influence the past decades in programming. But not directly: its influence is not via its killer apps. Smalltalk influenced programmers. The Smalltalk mark can be traced in Python and Ruby design decisions. And many programmers have been touched by Smalltalk ideas. But Smalltalk, as technology, didn’t exploded. We can discuss the reasons: early “balkanization” of providers, no early open source implementation. My thoughts: it is too couple to its own “GUI IDE”, and it is a bit overwhelming (too many pieces).

I think that is time to explore alternatives path. In the past decades, I visited many technologies and languages, and in the past ten (more or less) years, I took again Smalltalk and tried to follow an alternative path.

My position: we should try a simpler Smalltalk. An Smalltalk not tied to GUI IDE, not tied to thousands of classes. A simple implementation that can access the rest of the world advances in programming.

So, I started three own implementations: Smalltalk hosted in .NET, in Java and in JavaScript/Node.js:

More info in

But this post is not dedicated to review those implementation. Its purpose is to write down some ideas about how to create an Smalltalk, without struggling with the shrinking of a previous image.

The Core

I think that a new Smalltalk from scratch could be developed. An Smalltalk that runs in a host environment, like .NET, Java or JavaScript. Or another one. But it’s time to have an Smalltalk that is not an autism program: it should leverage the work of other technologies. For example, an Smalltalk running on JavaScript could access the JS ecosystem, via browser modules and libraries, or using Node.js or other engine package ecosystem.

The core Smalltalk should implement:

Object: the base object and class, with some base methods, like #subclass:.

Array: for arrays with numeric index, starting from 1 (to not break with Smalltalk tradition)

Dictionary: to map keys (names) to values

Primitive types: the underlying language (.NET, Java, JavaScript) could implement numbers (integers and floats), bytes, chars, strings, etc.

Access to native objects and types: to create them, to call type methods, to call instance methods.

The Library

First, a minimal implementation of some classes, that can be shipped with the initial implementation.

But then, and this is important: try to live in an ecosystem of packages. Instead of having all classes in the image, try to have an ecosystem of packages. Each Smalltalk application could define the needed packages, and then, the packages could be installed from the package ecosystem. In my implementations, I started to explore the use of NPM (Node Package Manager) to publish new package, and to install them per application, even with the use of explicit package version, so we have a less brittle ecosystem.

Package candidates:

– Test library (with an initial assert method)
– HTTP server
– MVC web framework (I have a minimal sample using Node.js Express)
– Distributed messages (I have a naive implementation in C#)
– etc.

In this way, the adoption of a package will be easy: not need of porting a package, only consume it, given the right dependencies in place. And, as in other technologies (Python, Ruby with gems, and notably, Node.js with NPM), each package can keep the description of the needed dependencies (NPM takes care of versions too).

Additional Items

I want to have an environment feature: that a class/package can load other classes, but only for internal use, without pollute the global Smalltalk environment.

I want to have an image running with the help of other image. That is, the Smalltalk VM should manage MORE THAN one running image. And one image could help another one. For example: one minimal image could have no compile method, but this method could be provided by the host image. In this way, a minimal image could be created, without any convoluted “shrinking” step. I already implemented this feature in my C# implementation.

In some implementations, I want to have an image (save and restore). But it is time to explore the development without the need of an image.

Any GUI should be created over the host environment. Use Windows.Form if your Smalltalk is running over C#. Or use another library, in Java (Swing? SWT?). But the idea is that the GUI management should be something clearly separated from the core implementation. Current popular Smalltalk implementations are too coupled with GUI management. Look at other technologies: Python, Ruby, Node.js, Go, etc.. There are lots of developers not using a technology so tied to a GUI IDE. And they are producing useful applications.

As I usually say: explore. That is the verb. We must explore alternative path, even when the outcome and gains are not clear. If I had seen killer applications in Smalltalk, or the use of Smalltalk in the creation of application that are really used by other developers (like in Python, Ruby, Java, JavaScript, Node.js, and others), I should stop thinking in this way. But, for some reason, Smalltalk is not taking the world by storm. Alternatives are here, floating around us, ready to be taken and to be explored.

Keep tuned!

Angel “Java” Lopez

Applications Creating Applications

I was working in different approaches to make programs create more programs. This post is a brief review of the path I took in the past years/months/weeks, and that it is still work in progress. I think they are interesting ways of doing programming, to be explored.

Dynamic Applications

The idea is to describe an application (entities, some relations, some code), and run it in a web runner that knows how to interpreted the application definition. I wrote a first implementation for past year Knockout competition:

More info at Dynamic Applications in Node.js.

The application could be described in a simple structure (in this example, a simple JavaScript object that can be serialized to JSON). The same structure could be interpreted and run by different host applications: a web application, an SPA, a mobile app, etc. And it could be used as a seed to generate code in a “concrete” technology, like Sinatra, Express+MongoDB, etc.

Code Generation

One of my preferred topics. I created tasks, templates and free models to generate applications in Express, and in other technologies (Sinatra, Django, Flask, PHP, all work in progress). I have implementations in C#, Ruby and Node.js. But my latest work is on Node.js:

You can have a simple example in:

Screenshots of a simple generated application:


And I’m working on creating an online site where you can describe the application (the free model, the features, databases, entities, web framework to use) and then download the generated application code.


In the project:

I describe each application as a set of cards (a deck). A card can have simple values, or a another card or deck. For example, a card could have an id, a name, a title to be displayed, and additional info. A card could have another deck of cards as a property (ie an Chemical Elements card could have a deck with one card by element). They can be rendered in different context: a web application, a web application as a Single Page Application, a mobile app (in Phonegap, or native). One thing is the structure and content of a card, and another thing is the render of a card. The later depends on the context of the host application.

A simple example

var model = {
    title: "My Deck",
    cards: [
        { title: "Card 1", text: "This is the card 1" },
        { title: "Card 2", text: "This is the card 2" },
        { title: "Card 3", text: "This is the card 3" }

Another sample, with screenshots:

A card content could be a simple text, a long text, an URL, an image, or a widget to be displayed by the hosted application (ie a Google Map). The card description could be static or could be generated on the fly (ie, a feed could be transformed to a card/deck, or it could be retrieved from a REST API). A card could have partial content (id, title), and a resolver can retrieve the rest of its content, using the id (ie, a card could represent a Wikipedia Page, and the id would be the URL; the resolver downloads the page content, and complete the card, if needed).

More fun is coming.

Keep tuned!

Angel “Java” Lopez

Erlang: Links, News And Resources (11)

Previous Post
Next Post

Erlang String Handling — Functional Erlang — Medium

Your first Erlang program (in style). – Ward Bekker


Erlang — Advanced

Orleans Actors Analysis – Tech stuff that interests me

reedr/slides/efsf2014-whatsapp-scaling.pdf at master · reedr/reedr

High Scalability – High Scalability – How WhatsApp Grew to Nearly 500 Million Users, 11,000 cores, and 70 Million Messages a Second

Elixir is for programmers

LambaJam Chicago – Welcome

ErlangSolutions Youtube channel – YouTube

10 Billion a Day, 100 Milliseconds Per: Monitoring Real-Time Biddin…

Scaling HTTP connections // Speaker Deck

odie2630463/ercheme · GitHub

altenwald – YouTube

My Links

Keep tuned!

Angel “Java” Lopez

End Of Iteration 2014w16

Previous Post
Next Post


I added a new sample, PingPong, to my actor model implementation in C#

The idea is to start measuring message processing performance. I added a variable number of worker threads, that affects the performance. I want to add a TryEnter method call but with a timeout. If some actor is busy, its messages retry process could be intensive in terms of time.


I started the project

to implement simple cards and deck to be rendered in web application (browser and mobile). I remember the great HyperCard. This project is simpler: only the cards and their content are specified, no position or render info are needed. There is render code adapted to the application (web browser, mobile) but the decks/cards are agnostic to device.


My Rust language interpreter in JavaScript:

I added the for command (parse and evaluation), and the built-in range function (to produce an iterator).


I wrote and published version 0.0.1 of:

A simple in-memory, in-process cache for Node.js/JavaScript.


My project to call a sequence of async/sync functions:

now has a map function that support functions with callback, not only sync functions. So, map can received an array and it can transform each elements calling asynchronous functions. I fixed a previous bug related to do, and published the version 0.0.3. Now, I’m starting to refactor the internal implementation. TDD rocks!


I also worked on three non-public projects.

More fun is comming.

Keep tuned!

Angel “Java” Lopez

Angular, Links And Resources (4)

Previous Post
Next Post

I was exploring web development for my code generation projects. Angular.js is in my radar, but I should write an spike or demo. Meanwhile, more links:

Ionic: The Most Advanced HTML5 Mobile App Framework

The Web Weekly Newsletter Edition #3

ng-embereño: Angular.js from the perspective of Ember.js – Google Drive

Isomorphic JavaScript: The Future of Web Apps – Airbnb Engineering

Building Huuuuuge Apps with AngularJS

A Shopping Cart Application Built with AngularJS – CodeProject

CustomerManager AngularJS/BreezeJS Application with a custom route provider

A dumb easy model for promises

Remastered Animation in AngularJS 1.2 –

AngularJS Best Practices: I’ve Been Doing It Wrong! Part 3 of 3 | Art & Logic Blog

AngularJS Sticky Notes Pt 1 – Architecture | One Hungry MindOne Hungry Mind

Code Organization in Large AngularJS and JavaScript Applications — Cliff Meyers

John Papa | Evangelist on the loose

Create an Angular App in Seconds with Hot Towel | John Papa

Home | Breeze.js
Rich data for JavaScript apps

Build Apps with Angular and Breeze | John Papa

Swiss-Army-Knife of AngularJS tools (with no external dependencies)

AngularJS and Bootstrap ☢

Lessons Learned: A Year with a Large AngularJS Project – @jhooks

My Links

Keep tuned!

Angel “Java” Lopez