Category Archives: Iteration

End Of Iteration 2014w27

Previous Post

Code Generation with AjGenesisNode

I updated and published new versions of my projects:

https://github.com/ajlopez/AjGenesisNode
https://github.com/ajlopez/AjGenesisNode-Entity
https://github.com/ajlopez/AjGenesisNode-Model
https://github.com/ajlopez/AjGenesisNode-Sinatra
https://github.com/ajlopez/AjGenesisNode-Express

Now, there are new functions to manage the model directory in AjGenesis. That directory contains the JSON files that represent the model, ie entities, project settings, db settings, etc. It resides in “./ajgenesis/models”.

The code generation for Sinatra and Express was improved. Instead of create a project and then, generate a “build” subdirectory in project directory, now the code generation acts over the current project directory. This way is more straighforward, and more aligned with other projects that generates code: there is no “build” subdirectory.

I added the preserve of code regions by name. If a generated file has a code region delimited with special text, that region is preserved even when the file is regenerated.

DylanSharp

My Dylan language interpreted in C#

https://github.com/ajlopez/DylanSharp

I added more binary operations. I should add type support, but in the current use cases, the untyped evaluation is OK.

SharpBus

My Mule-like simple service bus in C#

https://github.com/ajlopez/SharpBus

I added message transformers, message processors, instead of play payload transformers and processors. And I added a Router object. So, the implementation has/will have:

– Lambdas that operates on payload (processors, transformers, outputs, routers)
– Lambdas that operatos on message (processors, transformers, outputs, routers)
– Objects that operates on payload (processors, transformers, outputs, routers)
– Objects that operates on messages (processors, transformers, outputs, routers)

A payload is an untyped object. A message has a payload and additional properties (by name/value).

JavaScript Samples

I wrote my first AngularJS samples

https://github.com/ajlopez/JavaScriptSamples/tree/master/Angular

Dynamic Site in Express 4

Based on JSON definitions

https://github.com/ajlopez/ExpressSamples/tree/master/DynSite4

I added the support of https://github.com/ajlopez/LoadJsons to load JSON files that have references to other JSON files. The site is a prototype based on pages defined in JSON files. So you can easy change the JSON data to alter the prototyped site. Next steps: add lists based on MongoDB collections, with views. Then, code generation for differents targets (Express 4? Laravel?)

Others

I changed https://github.com/ajlopez/SharpGo with minor improvements. I also worked on three non-public projects. More fun is coming.

Stay tuned!

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

End Of Iteration 2014w26

Previous Post
Next Post

Express Samples

I created the first version of

https://github.com/ajlopez/ExpressSamples/tree/master/DynSite4

A dynamic site, using Express 4, EJS, and JSON file as site/pages definition format. Actually, only title and text are supported, but the idea is to define each site/subsite/page in JSON files. I will add list support (ie, tables with data) to be saved in MongoDB, and views (list rendered as tables/forms in HTML).

LoadJsons

To support the load of JSON model from MANY files (to be used in the above DynSite4), I started:

https://github.com/ajlopez/LoadJsons

A JSON file can refer to another one, and this small library load the full model from both.

DylanSharp

My Dylan language interpreter in C#

https://github.com/ajlopez/DylanSharp

I added the parse of simple expressions. I should add the type check of the expression. Maybe I will switch to many-phase parse: firts, build the AST (Abstract Syntax Tree), then check type, then generate expressions to be evaluated.

AjGenesis

I updated the Node.js module

https://github.com/ajlopez/AjGenesisNode-Model

Now, it uses ./ajgenesis/models as local directory to load and save model.

Others

I applied minor changes to https://github.com/ajlopez/SimpleStates (internal refactor), https://github.com/ajlopez/SharpBus (fixing source analysis), https://github.com/ajlopez/SimpleCurry (adding partial application). I worked on four non-public projects, too. More fun is coming.

Stay tuned!

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

End Of Iteration 2014w25

Previous Post
Next Post

Code Generation with AjGenesis

I published a new version of

https://github.com/ajlopez/AjGenesisNode

My code generation tool, based on Node.js. Now, it can preserve files in generate tasks (if you want one of your files doesn’t overwritten). But the key change was to put models under current project directory, ajgenesis/models folder. In this way, I can put all the AjGenesis-related stuff in only one directory related to current project. So, I refactored and republished the modules and examples of:

https://github.com/ajlopez/AjGenesisNode-Express
https://github.com/ajlopez/AjGenesisNode-Entity
https://github.com/ajlopez/AjGenesisNode-Hello

Next steps: refactor https://github.com/ajlopez/AjGenesisNode-Model to use the new directory, and refactor/complete the generation process in Express, Sinatra, Laravel, Django projects.

SharpBus

I worked on

https://github.com/ajlopez/SharpBus

implemented a simplified Mule-like message flow in C#, using TDD (Test-Driven Development). Now I have: input, output, transform, processors, routers, branches in flow. It was nice to see all in place, using “baby steps”, and the powerful lambdas of C#. I implemented transformer objects too. Next steps: instead of simply process a payload, start to process a complete message.

SimpleCurry

After attending a JavaScript meetup at Buenos Aires, I wrote a simple JavaScript curryfing function library:

https://github.com/ajlopez/SimpleCurry

Since then, I started to add some additional pieces, like partial application, and composition of functions.

SimpleStates

Thanks to @fabiomaulo, I met state machine implementations in C#. So, I wrote my own version in JavaScript:

https://github.com/ajlopez/SimpleStates

It has a fluent interface to define states, with triggers and actions. Next steps: add global triggers, and hierarchical states.

Others

I added some functions to https://github.com/ajlopez/SharpMongo core and REPL. I worked on four private projects, too. More fun is comming.

Stay tuned!

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

End Of Iteration 2014w24

Previous Post
Next Post

SharpGo

My Go Programming Language interpreter in C#

https://github.com/ajlopez/SharpGo

I added typed nodes to Abstract Syntax Tree, and nodes that generate expressions instead of commands. The types will help me to determine if an expression is valid or not, according to Go type specifications.

Mass

The Mass programming language interpreter

https://github.com/ajlopez/Mass

I reimplemented binary arithmetic operations (and string concatenation) without using ObOps, but directly using compiled lambda expressions. Next steps: removing ObOps dependency from compare operations. I think that a compiled lambda is a better outcome for such expression.

SharpMongo

My in-process, in-memory implementation in C# of a document database with a MongoDB-like interface:

https://github.com/ajlopez/SharpMongo

I fixed source analysis issuses, and added .count method to collections and to collection objects in REPL.

SharpBus

I started

https://github.com/ajlopez/SharpBus

A simple message bus implemented in C#, inspired by Mule. Notably, the flow of message can be defined using lambdas (something missing in Mule Java up to version 7). Using TDD, using fluent interface, consuming lamdbas, is the simplest way I found to implement a message bus.

Others

I worked fixing scripts in https://github.com/ajlopez/ajlopezsite. My parser “generator” https://github.com/ajlopez/GrammGen was  converted to VisualStudio 2010I worked on four non-public projects. More fun is coming.

Stay tuned!

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

End Of Iteration 2014w23

Previous Post
Next Post

SharpGo

My Go programming language interpreter in C#:

https://github.com/ajlopez/SharpGo

There are new nodes supported in parser. There are simple ones, but now the parser has a better coverage in order to implement simple use case. Next step: add some type checking, and generate commands and expression from parsed tree. I could generate commands and expression without type checking, as in an untyped interpreter. Or I could add type checking and generate the typed expression. In the first case, an add expression sums two objects. In the second case, an add expression sums two integers, or one integer and a float, or etc… In both cases, TDD helps me to implement the feature step by step.

PHP Samples and Laravel Code Generation

My scripts at:

https://github.com/ajlopez/PhpSamples

I improved a bit my Laravel sample, using layouts, and now, Bootstrap for style. Laravel is a simple web framework, that I want to use in AjGenesis code generation for PHP. So, I updated:

https://github.com/ajlopez/AjGenesisNode-Laravel

too, to generate a seed site. Next steps: generate the Laravel model, migration, controllers from entity free model.

Others

I added a simple figure to https://github.com/ajlopez/AjDrawJs (a rectangle). So the API is in good shape, I published version 0.0.1 of https://github.com/ajlopez/SimpleScraper. I added some nodes to parser in https://github.com/ajlopez/ScalaSharp. I worked on two non-public projects, too. I started a sample accesing database, using Express version 4, at https://github.com/ajlopez/ExpressSamples.

Stay tuned!

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

End Of Iteration 2014w22

Previous Post
Next Post

Express Samples

I updated my Express samples:

https://github.com/ajlopez/ExpressSamples

I added the first simple samples that use the new Express version 4.

SharpGo

My Go programming language interpreter in C#

https://github.com/ajlopez/SharpGo

Minor additions, new node types and parser tests

ScalaSharp

My Scala interpreter in C#

https://github.com/ajlopez/ScalaSharp

I continue to add support for expression and commands nodes, with parser examples and tests

SimpleApps

MyApps derivative

https://github.com/ajlopez/SimpleApps

I added some entity and property support methods, using TDD as usual.

Others

Minor changes in https://github.com/ajlopez/AcquarellaJS, and I worked on two non-public projects, too.

More fun is coming.

Stay tuned!

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

End Of Iteration 2014w21

Previous Post
Next Post

ClojSharp

My Clojure interpreter in C#

https://github.com/ajlopez/ClojSharp

now it has a console program, and minor improvements.

ScalaSharp

My Scala interpreter in C#

https://github.com/ajlopez/ScalaSharp

I was working in type detection, and separating expression nodes from command nodes.

SimpleApps

I started

https://github.com/ajlopez/SimpleApps

A more clear implementation for dynamic apps in JavaScript/NodeJs

SharpGo

Go programming language interpreter in C#

https://github.com/ajlopez/SharpGo

Many improvements in lexer and parser.

Others

I updated https://github.com/ajlopez/AcquarellaJS my syntax highlighter in JavaScript. Added samples to https://github.com/ajlopez/SimpleScraper. Minor changes in https://github.com/ajlopez/SimpleQueue. Adding right arrow in function definition for https://github.com/ajlopez/RustScript. I was working on three non-public projects, too. More fun is coming.

Stay tuned!

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

End Of Iteration 2014w20

Previous Post
Next Post

SharpGo

Go programming language interpreter in C#:

https://github.com/ajlopez/SharpGo

I added comparison operators in lexer, parse binary expression using arithmetic and comparison operators, add statements separated by semicolons, parse blocks, parse assignment. Go is a type language, so I’m building the Abstract Syntax Tree of to-be-typed nodes, before evaluating the expressions as in an untyped interpreter.

SimpleScraper

Simple HTML scraper, implemented in plain JavaScript, without dependencies:

https://github.com/ajlopez/SimpleScraper

It runs on Node.js, but it could run from browser. I improved the sample use cases, scraping two popular Argentinean news sites. The samples get an article or a frontpage, and produce JSON output.

ClojSharp

Clojure interpreter in C#:

https://github.com/ajlopez/ClojSharp

This week I added multi-functions: functions defined with different bodies according to arity (no argument, one argument, two arguments and rest, etc..) I started to add support for anonymous function macro reader

Others

A minor refactor in https://github.com/ajlopez/AcquarellaJS my syntax highlighter in JavaScript, work in progress. I added some simple samples to https://github.com/ajlopez/ScalaSamples. I started to support the add of named nodes to compiler context in https://github.com/ajlopez/ScalaSharp. I also worked on three non-public projects. More fun is coming.

Keep tuned!

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

End Of Iteration 2014w19

Previous Post
Next Post

SimpleArgs

I published a new version of:

https://github.com/ajlopez/SimpleArgs

A Node.js module to process argument options. I refactored some pieces, and now, the use of the module is more simple. The current API is inspired in the previous work, mixed with minimist project ideas, by @substack.

Code Generation for PHP Laravel

I started to write

https://github.com/ajlopez/AjGenesisNode-Laravel

using my AjGenesis code generation tool, based on Node.js. Only the first tests (models, create a project) are in place. Next steps: improve create project, and start generate site task and templates.

Clojure in C#

I updated

https://github.com/ajlopez/ClojSharp

to use multifunctions (functions that have different bodies depending on number of arguments). It was good to see TDD helping me to add this functionality.

SimpleScraper

In my project:

https://github.com/ajlopez/SimpleScraper

scraper for JavaScript/Node.js, I added a new sample (scrap news from argentinean news site). And refactor some methods and internal implementation. TDD Rocks!

Go in C#

The SharpGo project:

https://github.com/ajlopez/SharpGo/commits/master

I added new node to AST (Abstract Syntax Tree), some operators, lexer tokens, and parser tests.

I was working in three non-public projects, too.

More fun is coming.

Keep tunes!

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

End Of Iteration 2014w18

Previous Post
Next Post

Node Samples

I added a Picasa API search demo application

https://github.com/ajlopez/ExpressSamples/tree/master/MyPicasa

https://twitter.com/ajlopez/status/462919814701281281/photo/1

SimpleScraper

I added more basic functionality to my JavaScript scraper:

https://github.com/ajlopez/SimpleScraper

Now, each document element has a list of attributes. As a concrete use case, there are two console samples that generate structured JSON data from two  popular Argentinean news sites:

https://github.com/ajlopez/SimpleScraper/tree/master/samples/clarin
https://github.com/ajlopez/SimpleScraper/tree/master/samples/lanacion

https://twitter.com/ajlopez/status/463006440660017153/photo/1

SharpGo

An interpreter of Go programming language written in C#, work in progress

https://github.com/ajlopez/SharpGo

Some lexer pieces in place, and the first parse expression method.

SimpleNeuron

Artificial Neurons in JavaScript:

https://github.com/ajlopez/SimpleNeuron

I removed events: no use case for them, yet. I added the construction of a multilayer network. Next step: automatic learning using back-propagation.

ClojSharp

Clojure interpreter in C#:

https://github.com/ajlopez/ClojSharp

I implemented metadata reader. Big surgical refactor: now adding metadata produces a new object (in previous naive implementation, the metadata was attached to the original object). Now, it follows Clojure expected semantics. But TDD saved my day!

Google Code Jam

I participated in Round 1B:

https://code.google.com/codejam/contest/2994486/dashboard

I solved only one problem, check

https://github.com/ajlopez/TddRocks/tree/master/Gcj2014/Repeater

For another problem, Lottery, I had a not written solution with O(n,m). I thought that it was not good enough for processing large dataset. But, apparently, the large dataset had no hard problem. Some contestants solved the problem using O(n,m) solutions. It was an interesting problem, that deserve more thought. I didn’t understand the third problem (I confused tickets with flights)

Others

There is a new empty Laravel PHP sample at https://github.com/ajlopez/PhpSamples/tree/master/Laravel/MyLaravel. Some new node parse methods in ScalaSharp https://github.com/ajlopez/ScalaSharp. I added first map, reduce implementations to https://github.com/ajlopez/SimpleFlow. I added more features to serialization in https://github.com/ajlopez/AjErl.

I worked on three non-public projects, too.

More fun is coming.

Keep tuned!

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