Monthly Archives: January 2014

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

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

End of Iteration 2014w04

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

MongoDB: Links, News, And Resources (2)

Previous Post
Next Post

Powered by MongoDB: Rafflecopter
http://blog.10gen.com/post/23286533820/powered-by-mongodb-rafflecopter
Rafflecopter is a web app that helps online publishers run sweepstakes on
their own blogs and other sites.

Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase vs Membase vs
Neo4j comparison
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis/

ric03uec / nodeblox
https://github.com/ric03uec/nodeblox
an extensive nodejs tutorial

MongoDB for Akka Persistence
http://debasishg.blogspot.com/2009/08/mongodb-for-akka-persistence.html

MongoDB, Java and Object Relational Mapping
http://www.infoq.com/articles/mongodb-java-orm-bcd
Today’s NoSQL landscape includes a number of very capable contenders
tackling big data problems in many different ways. One of these contenders
is the very capable MongoDB. MongoDB is a document-oriented schema-less
storage solution that uses JSON-style documents to represent, query and
modify data.

A Year with MongoDB
http://blog.engineering.kiip.me/post/20988881092/a-year-with-mongodb

How can I set up MongoDB on a Node.js server using node-mongodb-native in
an EC2 environment?
http://stackoverflow.com/questions/4789045/how-can-i-set-up-mongodb-on-a-node-js-server-using-node-mongodb-native-in-an-ec2

Creating a simple blog with node.js, express and mongodb
http://planetcakephp.org/aggregator/items/5634-creating-a-simple-blog-with-nodejs-express-and-mongodb

Getting Started with MongoDB and Node.js
http://www.slideshare.net/ggoodale/getting-started-with-mongodb-and-nodejs

A simple log server using express, nodejs, and mongodb
http://www.codeproject.com/Articles/356975/A-simple-log-server-using-express-nodejs-and-mongo

Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml
http://addyosmani.com/blog/building-backbone-js-apps-with-ruby-sinatra-mongodb-and-haml/

Making a ToDo list with node.js, MongoDB, Mongoose, MongoHQ, and Heroku
http://lalexgraham.wordpress.com/2011/12/27/making-a-todo-list-with-node-js-express-mongodb-mongoose-mongohq-and-heroku/

ToolPartTeam / backbone-mongodb
https://github.com/ToolPartTeam/backbone-mongodb

Composition Of Responsibility vs Interface Implementation
http://lostechies.com/derickbailey/2012/01/03/composition-of-responsibility-vs-interface-implementation/

Using MongoDB with ASP.NET Web API
http://blogs.msdn.com/b/henrikn/archive/2012/02/19/using-web-api-with-mongodb.aspx

Hadoop plugin for MongoDB: The Elephant in the Room
http://www.10gen.com/events/hadoop

Clojure demo web application using Ring, Compojure, MongoDB and Fusion
http://www.youtube.com/watch?v=4CFy5C2OvM4&feature=youtu.be

Heroku, mongo, node.js – a problem
http://swizec.com/blog/heroku-mongo-node-js-a-problem/swizec/3565

marcello3d / node-mongolian
https://github.com/marcello3d/node-mongolian

Using MongoDB on Mono
http://www.infoq.com/presentations/using-MongoDB-on-Mono
Justin Dearing presents a brief introduction to MongoDB, and focuses on
interacting with it in Mono via the official 10gen driver. Techniques for
handling business logic in application code, such as LINQ are discussed.
This is a very code centric talk.

MongoDB – How To Benchmark and Test Performance Using mongo-perf
http://blog.beyondfog.com/mongodb-how-to-benchmark-and-test-performance-using-mongo-perf/

MongoDB – Operations in the New Aggregation Framework
http://blog.mongodb.org/post/16015854270/operations-in-the-new-aggregation-framework

mongodb / mongo-hadoop
https://github.com/mongodb/mongo-hadoop

Rails Caching Benchmarked: MongoDB, Redis, Memcached
http://nosql.mypopescu.com/post/13493023635/rails-caching-benchmarked-mongodb-redis-memcached

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

Keep tuned!

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

Erlang: Links, News And Resources (6)

Previous Post
Next Post

Elixir – A modern approach to programming for the Erlang VM on Vimeo
http://vimeo.com/53221562

15 Erlang – Distributed Programs – Node Creation – YouTube
http://www.youtube.com/watch?v=UZ93akCarck

JLOUIS Ramblings: Acme as an editor
http://jlouisramblings.blogspot.co.uk/2013/04/acme-as-editor_20.html

Erlang/OTP at EE: journey and lessons learned – Erlang User Group (London, England) – Meetup
http://www.meetup.com/erlangusergroup/events/116722662/

Erlang Factory – Dublin Erlang Factory Lite 2013 – Register
https://www.erlang-factory.com/conference/Dublin2013/register

Aprendiendo Erlang: Comunicación entre procesos (Ping-Pong).
http://aprendiendo-erlang.blogspot.com.ar/2011/06/comunicacion-entre-procesos-ping-pong.html

Erlang — Concurrent Programming
http://www.erlang.org/doc/getting_started/conc_prog.html

extend/bullet · GitHub
https://github.com/extend/bullet
Bullet is a Cowboy handler and associated Javascript library for maintaining a persistent connection between a client and a server.

duomark/erlangsp · GitHub
https://github.com/duomark/erlangsp
Erlang Services Platform

Erlang the movie II the sequel
http://www.gar1t.com/blog/2013/03/21/erlang-the-movie-ii-the-sequel/

Erlang-style Supervisor Module for Scala Actors ←
http://jonasboner.com/2008/06/16/erlang-style-supervisor-module-for-scala-actors/

Open Telecom Platform – Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Open_Telecom_Platform

What They Don’t Teach You About Running a Business When Taking Your CS Degree
http://www.infoq.com/presentations/Business-Lessons-Cesarini

Parsing packets Erlang style using core.logic
http://tgk.github.com/2013/02/parsing-packets-erlang-style-using-core-logic.html

ErlangDC 2013 Conference
http://erlangdc.com/

jacobgroundwater/federation · GitHub
https://github.com/jacobgroundwater/federation
Node.js. Federation is inspired by Akka and Erlang, and borrows some semantics from the actor model.

Federation by jacobgroundwater
http://underflow.ca/federation/
Federation is a federated message network for distributed environments

Programming Rules
http://www.erlang.se/doc/programming_rules.shtml

[erlang-questions] hobbyists, erlang, elixir (was Improve $handle_undefined_function)
http://erlang.org/pipermail/erlang-questions/2013-January/071949.html

Merge branch ‘bjorn/remove-parameterized-modules/OTP-10616’ · 35adf88 · erlang/otp
https://github.com/erlang/otp/commit/35adf88290339ecdbbcd0a1290032d599bda26c4#commitcomment-2459599

Persisting your entities in erlang
http://marcelog.github.com/articles/erlang_persistence_entities.html

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

Keep tuned!

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

End Of Iteration 2014w03

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

TDD Rocks! (9) JavaScript and Node.Js

Previous post

Thanks to JavaScript Meetup group at Buenos Aires, I gave an introductory talk about JavaScript and Test-Driven Development, using Node.js. The sample is basic, but I hope it is an starting point to appreciate the goodness of TDD workflow in JavaScript development.

The meetup group link:

http://www.meetup.com/Meetup-js/

My talk in “Anglish”:

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

My presentation:

https://github.com/ajlopez/Talks/tree/master/TddJavaScript
http://ajlopez.github.io/Talks/TddJavaScript/index.html#/

Links/modules:

http://nodejs.org/
https://github.com/ajlopez/SimpleUnit
http://qunitjs.com/

Full post in Spanish http://msmvps.com/blogs/lopez/archive/2013/11/08/tdd-rocks-8-javascript-y-node-js.aspx with additional video and text in Spanish.

Keep tuned!

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

End Of Iteration 2014w02

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