Angel \”Java\” Lopez on Blog

April 15, 2014

End Of Iteration 2014w15

Previous Post

Code Generation

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

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

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 https://github.com/ajlopez/AjGenesisNode-Express 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 https://github.com/ajlopez/AjGenesisNodeServer 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.

Python

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

https://github.com/ajlopez/PythonSamples/tree/master/Flask

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

Actor Model in C#

I refactored my project

https://github.com/ajlopez/Aktores

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

https://github.com/ajlopez/AjErl

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:

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

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

Others

I added some code kata tests to my JavaScript samples https://github.com/ajlopez/JavaScriptSamples. I added metadata macro readind go my Clojure in C# https://github.com/ajlopez/ClojSharp. I started to add type checking in my node tree for Scala in C# https://github.com/ajlopez/ScalaSharp/commits/master. I added qualified name evaluation to my Rust interpreter in JavaScript https://github.com/ajlopez/RustScript. I worked on two non-public projects, too.

More fun is coming.

Keep tuned!

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

April 3, 2014

New Month’s Resolutions: April 2014

Review of my March’s resolutions:

- Work on DictSharp [complete] see repo
- Give talk about Node.js Distributed Applications [complete] see repo see online slides
- Improve SimpleGammon [complete] see repo
- Improve Annalisa [complete] see repo
- Add @for to Templie [pending]
- Work on PreciosaAnnalisa online web services [complete] see repo
- Improve my Node.js Distributes Applications samples [complete] see repo see repo see repo
- Work on ScalaSharp [complete] see repo
- Improve ClojSharp [complete] see repo
- Improve SimpleAsync, do operation (functions in parallel) [pending]
- Improve Aktores [pending]
- Distributed messages in AjErl [pending]
- Add variable scope to Mass language [pending]
- Start code generation as a service [partial]

Additionally, I worked on:

- Complexo, simple complex numbers operations in JavaScript [complete] see repo
- Started RustScript, a Rust programming language interpreter in JavaScript [complete] see repo
- Continue RuScript, a Ruby interpreter in JavaScript [complete] see repo
- Continue RubySharp, a Ruby interpreter in C# [complete] see repo
- Started AjLispScala, a Lisp interpreter in Scala, using TDD and SBT [complete] see repo
- Recorded a second video Node.js Spanish tutorial [complete] see post

For this new month, my resolutions are:

- Continue AjLispScala
- Continue AjGenesisNode-Express
- Continue AjGenesisNode-PHP
- Continue RuScript
- Continue RustScript
- Distributed Messages in AjErl
- Give a talk Intro to Node.js
- Publish a new Node.js video tutorial

More fun is coming.

Keep tuned!

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

April 1, 2014

End Of Iteration 2014w13

Previous Post
Next Post

AjGenesis Agents

I started to add agents support to AjGenesis for Node, Express tasks:

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

The idea of agents is: instead of having code to render or produce page, code, classes, the agents are queried to solve problems: render this field, render this input, create the validation code, etc. Each agent could accept or not the problem: if an agent specialized in Angular detects that Angular is not being used in the application, then it is not loaded. Work in progress.

Ruby in C#

I updated:

https://github.com/ajlopez/RubySharp

My Ruby interpreter in C#. I added local variables detection. Ruby is a language where the local variables used in an scope can be listed. I wrote code to retrieve the name of local variables from expressions.

Clojure in C#

I worked on:

https://github.com/ajlopez/ClojSharp

There are a few new primitived forms and special form, and more parser/lexer support.

Scala in C#

I started to add dynamic object support to

https://github.com/ajlopez/ScalaSharp

The idea is to have objects with defined methods. Maybe, I will re-implement the object without dynamic methods: these should be defined at compile time, instead of runtime. I’m thinking about the definition of classes for many objects, and singleton classes for only one object.

Rust in JavaScript

I updated my Rust interpreter in JavaScript:

https://github.com/ajlopez/RustScript

with the support of modules, and public functions exposed in modules. I should add the references to them, using double colon operator.

AjLisp in Scala

To practice TDD and the use of SBT (Simple Build Tool), I started:

https://github.com/ajlopez/AjLispScala

Where I’m reimplemented AjLisp ideas in Scala, using scalatest library for TDD

JavaScript Samples

To explore WebGL, canvas, and implement some code katas, I created:

https://github.com/ajlopez/JavaScriptSamples

WebGL is not easy: lot of details to setup an scene. Canvas examples were borrowed from other of my projects. To practice TDD, I started to wrote simple code katas, using SimpleUnit and Node.js

I was working on two non-public projects, too. More fun is coming.

Keep tuned!

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

March 8, 2014

New Month’s Resolutions: March 2014

Filed under: C Sharp, Open Source Projects, Erlang, Clojure, Scala, AjErl, ScalaSharp, ClojSharp — ajlopez @ 7:27 pm

Review of my February’s Resolutions:

- Complete distributed messaging in AjErl [partial] see repo
- Complete dot notation in AjLisp [pending]
- Improve ClojSharp [complete] see repo
- Work on ScaScript [partial] see repo
- Work on ScalaSharp [complete] see repo
- Add variable scope to Mass [pending]
- Complete first version Aktores actor model in C# [pending]
- More code generation tasks, templates, models in AjGenesis for Node, generating Express, Meteor, Sinatra applications [partial] see repo

To compensate missing coding, I worked on:

- Create Annalisa [complete] see repo with online web services and demo
- Start SimpleAsync [complete] see repo
- Create my first Meteor samples [complete] see repo
- Start Templie, a simple template engine in Java [complete] see repo
- Start SimpleScraper, a simple scraper in JavaScript/Node.js [complete] see repo

And I made minor improvements on DylanSharp

New month’s resolution:

- Work on DictSharp
- Give talk about Node.js Distributed Applications
- Improve SimpleGammon
- Improve Annalisa
- Add @for to Templie
- Work on PreciosaAnnalisa online web services
- Improve my Node.js Distributes Applications samples
- Work on ScalaSharp
- Improve ClojSharp
- Improve SimpleAsync, do operation (functions in parallel)
- Improve Aktores
- Distributed messages in AjErl
- Add variable scope to Mass language
- Start code generation as a service

More fun is coming.

Keep tuned!

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

February 24, 2014

Akka: Links, News And Resources (7)

Filed under: Akka, Distributed Computing, Java, Links, Scala — ajlopez @ 11:11 am

Previous Post

ThreadPools
http://www.playframework.com/documentation/2.2.x/ThreadPools

chanan/AkkaGuice
https://github.com/chanan/AkkaGuice

typesafe.com
http://typesafe.com/blog/running-a-2400-akka-nodes-cluster-on-google-compute-engine

Distributed Publish Subscribe in Cluster — Akka Documentation
http://doc.akka.io/docs/akka/2.2.3/contrib/distributed-pub-sub.html

Microkernel — Akka Documentation
http://doc.akka.io/docs/akka/2.2.3/scala/microkernel.html

Typesafe Blog – PlayFramework – Blog – Typesafe
http://typesafe.com/blog/PlayFramework

yngui/akka-disruptor
https://github.com/yngui/akka-disruptor

Dispatchers — Akka Documentation
http://doc.akka.io/docs/akka/snapshot/scala/dispatchers.html

rogeralsing/Pigeon
https://github.com/rogeralsing/Pigeon
Akka in C#

Getting Started Tutorial (Scala): First Chapter — Akka Documentation
http://doc.akka.io/docs/akka/2.0.2/intro/getting-started-first-scala.html

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

Keep tuned!

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

February 19, 2014

End Of Iteration 2014w07

Filed under: .NET, C Sharp, Iteration, JavaScript, NodeJs, Open Source Projects, Scala, ScalaSharp — ajlopez @ 7:15 pm

Previous Post
Next Post

A lot of interesting topics and code.

MeteorSamples

I started to explore Meteor:

https://github.com/ajlopez/MeteorSamples

You can see one of my samples deployed at:

http://mycompany.meteor.com/

A simple CRUD (WIP) application. Next steps: code generation using AjGenesis for Node.js, mobile look, and wrap up as a PhoneGap application.

I also wrote posts:

Programming Meteor (1) First Steps
Meteor: Links And Resources (1)

ScalaSharp

My Scala interpreter in C#:

https://github.com/ajlopez/ScalaSharp#

I started to switch from a tree of expression to a tree of nodes (a classical AST). In this way, I could implement type checking, compilation, etc… visiting the node tree. There are differences between an expression and a node. A node could be a name, but that name, in Scala, could be a val, a var, or a def. I have not the full context to decide what kind of expression to invoke. So, I need a previous step. A node is the first parser output. A tree node could be visited, performing type checking and then producing the correct expression.

SimpleReact

Inspired by Meteor .autorun method, I wrote a react library in JavaScript

https://github.com/ajlopez/SimpleReact

As usual, simple code, using TDD workflow.

SimpleScraper

I continue adding features to

https://github.com/ajlopez/SimpleScraper

A simple JavaScript library to process an HTML string. I should add more features, and write a sample, scraping an e-commerce site.

Others

A minor addition in ClojSharp https://github.com/ajlopez/ClojSharp using recur in a function

Completing the model in https://github.com/ajlopez/AjGenesisNode-Express supporting that an entity references another entity.

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

Keep tuned!

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

February 14, 2014

Akka: Links, News And Resources (6)

Filed under: Akka, Distributed Computing, Java, Links, Scala — ajlopez @ 3:23 pm

Previous Post
Next Post

You know: I’m interested in actor models in general, and Akka implementation in particular, having distributed applications. I started two projects implementing Akka ideas, in Node.js and in C#:

https://github.com/ajlopez/SimpleActors
https://github.com/ajlopez/Aktores

Now, more links of my collection of links:

mrb: Distributed Systems Archaeology: Ricon West, 2013.10.30
http://michaelrbernste.in/2013/11/22/distributed-systems-archaeology.html

Using Akka in Scala IDE – Stack Overflow
http://stackoverflow.com/questions/13585927/using-akka-in-scala-ide

Pacific Northwest Scala 2013 Akka in Production: Our Story by Evan Chan – YouTube
http://www.youtube.com/watch?v=c1heorOM2LE

Akka vs Storm | Blog of Adam Warski | Planet JBoss Community
http://planet.jboss.org/post/akka_vs_storm

Akka in Production: Our Story
http://www.slideshare.net/EvanChan2/akka-inproductionpnw-scala2013

typesafe.com
http://typesafe.com/blog/typesafe-gets-sprayed

Typesafe Reactive Platform Acquires New High-Performance HTTP Foundation
http://www.marketwired.com/press-release/Typesafe-Reactive-Platform-Acquires-New-High-Performance-HTTP-Foundation-1841738.htm

Dev Time: Cope with Failure – Actor Supervision in Akka
http://blog.florian-hopf.de/2013/10/cope-with-failure-actor-supervision-in.html

Akka Work Pulling Pattern to prevent mailbox overflow, throttle and distribute work » Michael on development
http://www.michaelpollmeier.com/akka-work-pulling-pattern/

Going Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
http://www.slideshare.net/jboner/going-reactive-eventdriven-scalable-resilient-systems

Let it crash • Where Akka Came From
http://letitcrash.com/post/40599293211/where-akka-came-from

Typed Channels (EXPERIMENTAL) — Akka Documentation
http://doc.akka.io/docs/akka/2.2.1/scala/typed-channels.html

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

Keep tuned!

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

February 12, 2014

End Of Iteration 2014w06

Previous Post 
Next Post

More deliberate TDD practice in my open source projects

AjErl

My Erlang-like interpreter in C#:

https://github.com/ajlopez/AjErl

I added selective receive to process mailboxes. It was an interesting implementation, where each mailboxes has a save queue to keep the rejected messages. Once a message is accepted, the save queue is put again as a message queue, ready to be consumed again.

ScalaSharp

My Scala interpreter in C#:

https://github.com/ajlopez/ScalaSharp

I added binary expressions. I started to think about type check implementation. This next week I will add an explicit AST (Abstract Syntax Tree) to be used for type checking. Not all Scala expression can be type checked at parser time, because possible not-resolved cross references.

ScaScript

My Scala interpreter in JavaScript:

https://github.com/ajlopez/ScaScript

Minor additions: parse class with body, parse a suite of statement (a list of statement). One thing to review in this project and the previous one: Scala new line in lexer/parser. The language has special rules to skip or not a new line, depending on the context. I should add type checkting to this JavaScript project.

ClojSharp

My Clojure interpreter in C#:

https://github.com/ajlopez/ClojSharp

I applied a surgical refactor: internal reimplementation of top level context to save internally clojure vars. In this way, the top level definitions are saved not as name/value but as named var/value. The rest of the context are simple name/value dictionaries (like the context created by the special form let).

SimpleScraper

I created a new JavaScript/Node.js package:

https://github.com/ajlopez/SimpleScraper

a simple web scraper in JavaScript/Node.js. The initial commits only process HTML in text, iterating over tag items. Light weight, no dependencies needed yet.

Others

I added minor changes to:

https://github.com/ajlopez/AjSharp
https://github.com/ajlopez/AjScript
https://github.com/ajlopez/RubySharp
https://github.com/ajlopez/RuScript

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

February 7, 2014

New Month’s Resolutions: February 2014

Review of my January’s Resolutions:

- Start to implement Akka-like actor model in C# [complete] see repo
- Start to implement Scala interpreter in JavaScript [complete] see repo
- Work on AjErl [complete] see repo
- Work on Mass (I have many ideas to implement as module pattern and variable scope access) [pending]
- Work on DylanSharp [complete] see repo
- Start an implementation of ML (JavaScript? C#?) [pending]

I also worked on:

- Improving Scala interpreter in C# [complete] see repo
- Adding dot notation to Lisp interpreter in C# [complete] see repo
- Improving Ruby interpreter in JavaScript [complete] see repo
- Improving Clojure-like interpreter in C# [complete] see repo
- First templates, tasks generating Sinatra application in AjGenesis for Node [complete] see repo

My new month’s resolutions:

- Complete distributed messaging in AjErl
- Complete dot notation in AjLisp
- Improve ClojSharp
- Work on ScaScript
- Work on ScalaSharp
- Add variable scope to Mass
- Complete first version Aktores actor model in C#
- More code generation tasks, templates, models in AjGenesis for Node, generating Express, Meteor, Sinatra applications

More fun is coming

Keep tuned!

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

February 4, 2014

End Of Iteration 2014w05

Filed under: AjErl, C Sharp, Erlang, Iteration, JavaScript, NodeJs, Scala, ScalaSharp — ajlopez @ 2:45 pm

Previous Post
Next Post

As usual, I was working on my open source projects:

AjErl

Big advances:

https://github.com/ajlopez/AjErl

I implemented mailbox in processes, and now I have a send operator !, and a receive expression. I started to add map support (the new Erlang feature) and now I have export form in place.

Using messages, send and receive, I could communicate local processes.

Next steps: selective receive, distributed applications.

ScalaSharp

My project:

https://github.com/ajlopez/ScalaSharp

It is still an interpreter, work in progress, of Scala, written in C#. But this week I added first type info support. In general, in my interpreter, I didn’t write type checks. But in this case, the source language, Scala, is a typed one. So I added TypeInfo to def arguments, returns, and var and val commands. I should decide where to put the type checking: I could add some checkpoints at parser time, but some class def are not known at that time, so I should add a second pass visitor for pending type checking.

Anyway, TDD supports my work and my refactor/redesigns!

ScaScript

My Scala interpreter in JavaScript (not a compiler, yet)

https://github.com/ajlopez/ScaScript

Few additions, but now I have types for var, val, def. I’m applying “dog fooding” of my SimpleGrammar module.

The same for

https://github.com/ajlopez/RuScript

I was working on three non-public projects, involving C#, Excel plugin, web applications in ASP.NET MVC, and simple server with Node.js/JavaScript and geolocation trends using d3.js

More fun is comming.

Keep tuned!

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

Older Posts »

The Shocking Blue Green Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 56 other followers