Angel \”Java\” Lopez on Blog

April 15, 2014

End Of Iteration 2014w15

Previous Post
Next Post

Code Generation

I wrote new tasks, templates using my AjGenesis code generation tool. I create a simple:

to generate a Django web site, with admin page. The code generation creates the model, and admin feature allows you to edit the data, using Sqlite. It’s simple, but it is working. Next steps: create custom views, and a new project to generate Flask web site.

I added text area input fields to the project that generates Express/Node.js web site from a model. Next steps: client-side validation, better server code organization, some initial tests.

I want to integrate these tools in a online app, so I started to have a web site that generate codes from a model, defined at client side. You will select technology (Express, PHP, Sinatra, Django, Flask, …), the models (mainly, entities like: customer, supplier, department, employee, invoice… ), the database, the features (multiple pages, single page, angular? backbone? other?, REST API?, phonegap wrapper?), and voila. A zip will be generated with the generated solution. That is, code generation as a service. Maybe I could add an API to be externally consumed.


I added a Flask web site example, work in progress, to my Python Samples:

I will use as a basis for my AjGenesis code generation version for Flask web sites.

Actor Model in C#

I refactored my project

an Akka-like actor model implemented in C#. Now, I have a mailbox per actor, but the actor message process is executed consuming task from a queue, with n thread launched by the initial actor system. It was good to see such refactor working: all is in place, now. It is a proof that you don’t need to design everything before coding. If you follow TDD (Test-Driven Development) new ideas (or old ideas that have not implemented yet) can be added without much effort.

Erlang in C#

I started to add serialization of message to my project

As usual, I started simple, using TDD: write input and out channel, using tests, red to green, refactoring. Instead of consuming an external library for serialization, I wrote a simple code, towards my first use case of distributed application. When the use case will be in place, I could start to think about other implementation path.

Google Code Jam

Past Saturday, I participated in Google Code Jam, Qualification Round. My code, usually written following TDD:

The Minesweeper problem is the tricky one. I should add the description of the problems, copying it from the original site.


I added some code kata tests to my JavaScript samples I added metadata macro readind go my Clojure in C# I started to add type checking in my node tree for Scala in C# I added qualified name evaluation to my Rust interpreter in JavaScript I worked on two non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez

February 26, 2014

End Of Iteration 2014w08

Filed under: C Sharp, Iteration, JavaScript, NodeJs, Open Source Projects, Python — ajlopez @ 5:02 pm

Previous Post
Next Post

More interesting projects and code TDD practices


A new JavaScript project:

to solve some use cases of Preciosa project. Preciosa is written in Django/Python, but I want to explore how to solve:

– Given an string, return associated properties (ie. analyze a product description, then return detected weight (from “10 gr” substring), brand (from “… Axe … “ substring). I create rules to detect some patterns (simple normalized substrings) and return a JavaScript object with detected properties/values.

– Search by word combination (done), and approximated words (WIP)

Now, I’m working on implementing Preciosa use cases, using its data for products, companies, brands, etc.  I’m implementing console programs, and I will to implement a web service with associated test page.


I started:

A new implementation, this time in JavaScript, for my syntax highlighter Acquarella (in C#). I plan to use it to generate colored HTML for my code snippets, and add them to my posts (in blog software that doesn’t allow JS scripts).


Someone asked on Twitter about a template engine in Java, without dependencies, a lightweight version. Then, I wrote

Now, it has expansion of variables in ${variable}, and process of @if commands. Next steps: adding @for, adding ${} using reflection.


My Scala interpreter in C#, in progress:

I was adding more INode concrete nodes. Instead of having expression tree, I want a node tree, to have type checking BEFORE evaluation, according to a typed compiled language.


I modified

It was published to

And created a new one (WIP):

for upcoming JSConf Uruguay 2014. Yes! I’m an speaker.


After attending JavaScript meetup with @getify talk, I wrote, following TDD as usual, a simple async library:

I want to add: .do to launch a “parallel” tasks (many consecutive .do returns an array with the collected result), and .map to process an array in “parallel”.


I wrote a new TDD exercises

this time in Python: syllable separation in Spanish. Good code kata. It was useful to me to learn and practice more Python.


Minor additions to,,

I also worked on two non-public projects. More fun is coming.

Keep tuned!

Angel “Java” Lopez

December 12, 2013

Python: Links, News And Resources (14)

Filed under: Links, Programming Languages, Python — ajlopez @ 5:07 pm

Previous Post

A test fixtures replacement for Python

Introducción a Tryton Application Platform // Speaker Deck

exception – Try/Catch in Python – Stack Overflow

Open Source Game


Creando un SCADA con Python y HTML5

Virtual machines should be invisible

PyCon Argentina 2012 – Design Patterns en Python // Speaker Deck

Python 2 debe morir // Speaker Deck

PyCon 2012

python – How to install pip on windows? – Stack Overflow

Flask – El microframework que revoluciona el mundo // Speaker Deck

pilas-engine – haciendo juegos en medio de la revolución // Speaker Deck

slides/ponete-pilas-django at master · machinalis/slides

slides/javascript-para-programadores-python at master · machinalis/slides

¡ Bienvenido a pilas !
Game Engine

A Simple Python NodeVisitor Example

Eli Bendersky’s website » Blog Archive » Python internals: Working with Python ASTs

Blender – Python

Watch PyDay Rafaela Episodes | Blip

Twitter / reingart: Introducción a Sugar en @pyconar …

Jython 2.7 and techniques for integrating with Java – Frank Wierzbicki

Java Empowered by Jython

My Links

Keep tuned!

Angel “Java” Lopez

December 9, 2013

Python: Links, News And Resources (13)

Filed under: Links, Programming Languages, Python — ajlopez @ 6:38 pm

Previous Post
Next Post

Singly, OAuth
Get started quickly with examples and libraries in Ruby (Rails, OmniAuth), Javascript (Node, Express), Python (Django), and more.

The Power of Pythonista 1.2
Pythonista is a well designed implementation of Python on iOS

7 Python Libraries you should know about

Python operator precedence

Strata NYC 2012 and PyData
A talk at Strata NYC on network visualization

Simple read only attributes with meta-class programming (Python recipe)

Camelot provides components for building business applications on top of Python, SQLAlchemy and Qt.  It is inspired by the Django admin interface.  You can use Camelot to develop both simple and complex business applications at warp speed.

Python @staticmethod vs @classmethod

What is the difference between @staticmethod and @classmethod in Python?

AMPPS is a stack of the Apache Web Server, MySQL, PHP, Perl, Python and SOFTACULOUS.

Associação Python Brasil: Time to call it a day

What does python print() function actually do?

The new print function in Python 3

PyCon 2012 Argentina, Projects

Tailing in Python

Why can’t Python handle true/false values as I expect?

#pythonIO webcast sobre Django

bconstantin / django_polymorphic

#pythonIO – segundo round de Web2Py

Frameworks de desarrollo de videojuegos en Python en el #PyConVe

Tv Stalker
diegosarmentero / tvstalker
Tv Shows social guide

My Links

Keep tuned!

Angel “Java” Lopez

December 5, 2013

New Month’s Resolutions: December 2013

Filed under: C Sharp, JavaScript, NodeJs, Python, Ruby, RubySharp — ajlopez @ 5:00 pm

Review of my November’s resolutions:

This new month’s resolution:

– Start compiler reduced Python to C, using JavaScript [complete] repo
– Give a talk about Ruby in C# [complete] slides repo
– Start Ruby to JavaScript compiler [complete] repo
– Complete variable scope in Mass language [pending]
– Give a talk about compiling languages to JavaScript [complete] slides
– Write web framework for AjTalkJs (to be used in Node.js) (plain? MVC?) [pending]
– Improve NPM modules in AjTalkJs and AjTalk [partial] repo
– Improve unit test support in AjTalkjs and AjTalk [partial] repo
– Improve match and data structure in AjErl [pending]

My December’s resolutions:

– Give a one-day Node.js course
– Refactor and improve CobolScript
– Continue writing Ruby to JavaScript compiler
– Variable scope in Mass language
– More modules in AjTalkJs

More fun is coming ;-)

Keep tuned!

Angel “Java” Lopez

November 21, 2013

Python in JavaScript/Node.js

Filed under: JavaScript, NodeJs, Open Source Projects, Py2Script, Python — ajlopez @ 6:15 pm

Some weeks ago, I attended an excellent conference, PyCon Argentina 2013. I should write about my personal experience. Now, I want to publish links and comments about the talk I gave.

As other talks, it is related to JavaScrip y Node.js. I explained my work on compiling Python to JavaScript, using JavaScript. My slides at:

You can read them online:

I was using Node.js:

The project I presented is at:

It can compile .py files to JavaScript, on the fly. And it can access to Node.js modules using import notation



Example using Express:

I mentioned other projects:

Recently, it entered in my radar:

See the benchmarks:

An additional branch. Past year, I gave a talk about Python implementations, and I mentioned PyPy. This year, I assisted to interesting PyPy talks. I started to explore how to compile Python to C, this time using JavaScript. My first attempts:

More fun is comming.

Keep tuned!

Angel “Java” Lopez

November 19, 2013

November 4, 2013

End Of Iteration 2013w44

Filed under: AjTalk, Iteration, JavaScript, NodeJs, Open Source Projects, Python, RedPython, Smalltalk — ajlopez @ 6:27 pm

Previous Post
Next Post

The main outcomes were: a talk, about my Smalltalk implementations, new sample code and a new project, inspired by Python and Smalltalk conference.

AjTalk Implementations

I reviewed and improved my implementations:

I added a sample using AjTalkJs, Node.js, Express.

My talk for Smalltalks 2013 at


I want to implement a compiler/transpiler from reduced (subset of) Python to C, at first using JavaScript.

The project:

I have two samples running: simple hello world, and

More ideas to implement this week. I should improve my Ruby in C# implementation, and maybe, write a Ruby implementation in JavaScript.

Keep tuned!

Angel “Java” Lopez

November 2, 2013

New Month’s Resolutions: November 2013

Time to review my October resolutions:

– Give a talk about PHP and Node.js [complete] see post and PHP/Node repo and PageJs repo at PHP Dev Argentina 2013
– Give a talk about TDD with ASP.NET MVC [complete] see repo
– Give a talk about Scala implementation [complete] see slides and simple samples
– Give a talk about Python in JavaScript [complete] see repo and slides at PyCon 2013 Argentina
– Give a talk about Smalltalk in JavaScript and C# [complete] see repo and slides at Smalltalks 2013

This new month’s resolution:

– Start compiler reduced Python to C, using JavaScript
– Give a talk about Ruby in C#
– Start Ruby to JavaScript compiler
– Complete variable scope in Mass language
– Give a talk about compiling languages to JavaScript (to be confirmed)
– Write web framework for AjTalkJs (to be used in Node.js) (plain? MVC?)
– Improve NPM modules in AjTalkJs and AjTalk
– Improve unit test support in AjTalkjs and AjTalk
– Improve match and data structure in AjErl

More fun is coming ;-)

Keep tuned!

Angel “Java” Lopez

October 28, 2013

End Of Iteration 2013w43

Previous Post
Next Post

The week was dedicated to prepare and give a talk, and prepare this week next talk.


My Python to JavaScript transpiler, written using JavaScript. It runs on node.js and browser.

It can use Node.js modules using import, and it can run Python scripts in the browser.

I gave a talk at PyCon Argentina 2013. My slides at:


My Smalltalk-like VM in bytecodes and JavaScript, written in JavaScript.

Now, I can use Node.js modules, run in server and browser. Example:

I was working in minor refactoring of:

And I was working on two non-public projects: one in C#, in-memory OLAP, and another one in Java, with agile team.

This week I will give a talk about my Smalltalk implementations at Smalltalks 2013 Argentina:

More fun is coming.

Keep tuned!

Angel “Java” Lopez

Older Posts »

The Shocking Blue Green Theme. Blog at


Get every new post delivered to your Inbox.

Join 70 other followers