Angel \”Java\” Lopez on Blog

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

January 31, 2014

Smalltalk, JavaScript, NodeJs, C#, and Tutti Li Fiocci

Filed under: AjTalk, C Sharp, JavaScript, NodeJs, Smalltalk, Talks, Video — ajlopez @ 5:43 pm

Past year, I gave a talk at Smalltalks 2013, Rosario, Argentina. The conference was a great experience to me, and there were many interesting talks, implementations and ideas.

My talk was about implementing Smalltalk, in C#, and JavaScript. The main repos are:

http://github.com/ajlopez/AjTalk (I presented it at Smalltalks 2010)
https://github.com/ajlopez/AjTalkJs (I presented it at Smalltalks 2011)

My recorded talk:

http://www.youtube.com/watch?v=-KFjSneVE2s

The presentation:

https://github.com/ajlopez/Talks/tree/master/Smalltalks2013
http://ajlopez.github.io/Talks/Smalltalks2013/index.html
More talks at http://ajlopez.github.io/Talks/

The first project is an interpreted based on byte codes, written in C#. It can compile to JavaScript, but the key features is to have a VM based on bytecodes, that have access to native .NET types and objects, remote execution, actors, and more. See my posts.

The second project is an implementation of Smalltalk but in JavaScript. Internally, it have a compiler to JavaScript, but also a compiler to bytecodes and then, an interpreted VM written in JavaScript. Both projects now supports NPM (Node.js package manager) for new modules.

In 2013, I added Node.js support and access to AjTalkJs, so I can run an Express application from Smalltalk:

 

Next experiments: distributed message. That is, an object in one machine sends a message to an object in a remote machine/process,  in a fire and forget way. I think Node.js ecosystem is a good plate to host such experiments. My previous work at Distributed Applications with Node.js. I want a distributed Smalltalk machine/application. Maybe, if the communication protocol is easy or pluggable, I could add clients/servers implemented in other Smalltalk dialects. But baby steps first ;-)

Keep tuned!

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

January 28, 2014

End of Iteration 2014w04

Filed under: AjErl, C Sharp, Erlang, Iteration, JavaScript, NodeJs, Open Source Projects, Scala, ScalaSharp — ajlopez @ 3:18 pm

Previous Post
Next Post

I worked on my open source projects:

AjErl

My Erlang implementation as interpreter in C#:

https://github.com/ajlopez/AjErl

First mailbox tests, including delayed message; adding lists as predefined module; write and test lists:map, lists:filter, lists:any, lists:all, lists:sum.

Parsing fun, with one clause and multiple match clauses.

ScalaSharp

My Scala-like interpreter in C#

https://github.com/ajlopez/ScalaSharp

I added binary arithmetic functions, variable expression first implementation (with context to hold the values), val command, object command.

Others

Updates in:

https://github.com/ajlopez/DylanSharp Dylan as interpreter in C#
https://github.com/ajlopez/ClojSharp Clojure as interpreter in C#
https://github.com/ajlopez/RuScript Ruby as interpreter in JavaScript
https://github.com/ajlopez/ScaScript Scala as interpreter in JavaScript
https://github.com/ajlopez/AjLisp Lisp interpreter in JavaScript

I worked on three non-public projects.

More fun is coming.

Keep tuned!

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

January 21, 2014

End Of Iteration 2014w03

Filed under: AjErl, AjLisp, C Sharp, Iteration, JavaScript, NodeJs, Open Source Projects — ajlopez @ 6:25 pm

Previous Post
Next Post

Great week extending interpreters.

AjErl

My Erlang implementation as interpreter in C#

https://github.com/ajlopez/AjErl

I added multi-functions, that is, functions with the same name and arity, but with different argument matching conditions. And I started to write a minimal Process, to have threads running functions. Next steps: implement process mailboxes.

AjLisp

I was working on my C# implementation

https://github.com/ajlopez/AjLisp

I started to add Java Dot Notation, to access native types and objects. So, I grabbed some code from RubySharp/PythonSharp/AjSharp to access .NET types and objects, and wrapped functions to invoke properties, methods and constructors.

Aktores

More work on implementing Akka-like actor model in C#

https://github.com/ajlopez/Aktores

I should refactor mailbox implementation. After a bit of design, I decided to have a worker thread by actor, consuming a concurrent queue. ActorRef could add message to the queue.

RuScript, ScaScript and SimpleGrammar

I updated the version of SimpleGrammar

https://github.com/ajlopez/SimpleGrammar

to fix a bug detected consuming the library from RuScript:

https://github.com/ajlopez/RuScript

I’m using SimpleGrammar in

https://github.com/ajlopez/ScaScript

my Scala-like interpreter in JavaScript (I just implemented only a minimal parser).

Others

I was working in two non-public projects, and updating old PHP personal sites. I moved the code generated for Sinatra

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

to use a modular instead of classic approach.

More fun is comming.

Keep tuned!

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

January 15, 2014

End Of Iteration 2014w02

Filed under: .NET, Akka, C Sharp, Iteration, JavaScript, Lambda Calculus, NodeJs — ajlopez @ 6:58 pm

Previous Post
Next Post

A lot of work at the second iteration of the year:

More Code Generation with AjGenesis

I created

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

with a simple Sinatra site generated using AjGenesis for Node. I should add the entity support (list, persistence, view, edit, new) but it was created in two hours. Nice experience adapting templates

Aktores

An Akka-like actor model implemented in C#. It was born on Sunday:

https://github.com/ajlopez/Aktores

I’m using TDD, as usual. My ideas are implemented using baby steps, make it works, make it right, and in the future, make it fast. I’m not concerned with performance yet, but to have all the pieces in place for local run. Then, I will add distributed processing. One of the key things is the message mailbox management. By now, I have only one by actor system, implemented using a concurrent queue. I planned to add a queue by actor, if specified at creation of the actor.

Scala in JavaScript

The project

https://github.com/ajlopez/ScaScript

An interpreter, not a “transpiler” to JavaScript. I want to do dog fooding of my SimpleGrammar project, and learn a bit about Scala language.

Lambda Calculus

Implemented in JavaScript, a Saturday code kata:

https://github.com/ajlopez/SimpleLambda

Next steps: add named functions.

DylanSharp

More work in my Dylan-like language implemented as an interpreter over C#:

https://github.com/ajlopez/DylanSharp

Others

I added minor functionality to ClojSharp (Clojure-like in C#) https://github.com/ajlopez/ClojSharp/commits/master. I worked on two non-public projects.

More fun is coming

Keep tuned!

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

January 12, 2014

New Month’s Resolutions: January 2014

A bit late, I was busy these days.

Review of my December’s Resolutions:

- Give a one-day Node.js course [complete]
- Refactor and improve CobolScript [partial] see repo
- Continue writing Ruby to JavaScript compiler [complete] see repo
- Variable scope in Mass language [pending]
- More modules in AjTalkJs [pending]

I was working on:

- Code generation using AjGenesis for Node, and templates for Express [complete]
- Started DylanSharp, Dylan interpreter in C# [complete] see repo
- Start to revamping old PHP websited [complete] see repo and repo
- Start support for modules and REPL to AjErl, my Erlang interpreter in C# [complete] see repo

My new month’s resolutions are:

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

More fun is comming

Keep tuned!

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

January 7, 2014

End of Iteration 2014w01

Previous Post
Next Post

First iteration of the year, more open source ideas, design, and TDD deliberate practice.

Code Generation, using AjGenesis

I updated

https://github.com/ajlopez/AjGenesisNode my AjGenesis tool for code generation
https://github.com/ajlopez/AjGenesisNode-Entity AjGenesis module to manage entity model
https://github.com/ajlopez/AjGenesisNode-Express AjGenesis module with tasks and templates to generate a simple web site, based on Node.js, Express, MongoDB

You can try the Quick Start of the Express module. Next steps:

- More property types
- Client-side validation
- Generate some basic tests
- Support of one-to-many entity relation

I could adapt the same templates to have another module that will generate PHP, MySQL web sites.

SimpleFlow

I published version 0.0.1 of:

https://github.com/ajlopez/SimpleFlow

I need it for chaining async calls in my tests and in my controlles in a non-public project. Use case to be described.

DylanSharp

I started to write a C# interpreter:

https://github.com/ajlopez/DylanSharp

trying to emulate Dylan language:

http://opendylan.org/

It’s a lisp-like programming language, with classes, and with a more Ruby/Python-like syntax, instead of parenthesis. As usual, I want to access native .NET types, classes and ecosystem, from a dynamic languages.

AjErl

I added first module support for my Erlang C# interpreter

https://github.com/ajlopez/AjErl

Others

I continue to adapt my old PHP sites https://github.com/ajlopez/ajlopezsite https://github.com/ajlopez/Todocontenidos to support latests PHP versions. I was working on three non-public projects, too.

More fun is coming.

Keep tuned!

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

December 28, 2013

TDD Rocks! (8) SharpBase in C#

Filed under: C Sharp, Google, Open Source Projects, ShapBase, Test-Driven Development, Video — ajlopez @ 6:24 pm

Previous Post
Previous Post with C#
Next Post

I recorded a new Google Hangout about using TDD (Test-Driven Development) workflow in Visual Studio 2010 and C#, writing my in-memory database project, SharpBase.

The video at:

http://www.youtube.com/watch?v=ymQePMZ2XEo

This time I implemented a Column class. It was not need in previous tests. But now, I want to have the use case of having an autonumeric column, I added tests and functionality to cover that feature. I didn’t design all at advance. I designed the solution test by test, use case by use case. Maybe, in some point, I would apply a surgical refactor/redesign, but now, I have the test battery to support such change.

This is the last video about SharpBase. Since now, I will update directly the GitHub repo. You can check:

https://github.com/ajlopez/SharpBase

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

Maybe, I will record a new exercise, but in Spanish: an MVC application.

Keep tuned!

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

« Newer PostsOlder Posts »

The Shocking Blue Green Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 57 other followers