Angel \”Java\” Lopez on Blog

April 1, 2016

Clojure: Links, News And Resources (23)

Filed under: Clojure, Links, Lisp, Programming Languages — ajlopez @ 8:48 am

Previous Post
Next Post

clj-wamp ~ Clojure WebSocket subprotocol for HTTP Kit

Purely functional data structures in Clojure: Red-Black Trees – Leonardo Borges

Clojure and LLVM

Clojure, Neo4j and Domain Specific Languages Applied to Lisp and Cancer – Ola Bini in Hamburg in Hamburg | XING Events

7 Languages in 7 Workshops: Clojure – Cambridge Software Craftsmanship (Cambridge, England) – Meetup

Getting Started


Introducing HipHip (Array): Fast and flexible numerical computation in Clojure — Prismatic Blog

In Retrospect: QCon NYC 2013 (and a conversation with Rich Hickey on languages) « Inviting Epiphany

Clojure/West Content on InfoQ

Rock Paper Scissors with core.async : Pure Danger Tech

Blog | Rich Hickey and core.async – Podcast Episode 035 | Relevance

Clojure – The Last Programming Language by Robert C. Martin at NDC 2011 at Oslo, Norway –

Leiningen 2 – Humane build management for Clojure

Clojure, core.async and the Lisp advantage – Leonardo Borges


Using java.jdbc | Clojure Documentation | Clojure Docs


Pedestal Documentation – Application Introduction


Fluokitten – Category Theory in Idiomatic Clojure


My Links

Stay tuned!

Angel “Java” Lopez

March 31, 2016

Artificial Intelligence: Links And Resources (21)

Filed under: Artificial Intelligence, Links — ajlopez @ 10:33 am

Previous Post

AlphaGo and the Declining Advantage of Big Companies

AlphaGo vs Lee Sedol: Game 5 – Video Commentary

From DeepMind To Watson: Why You Should Learn To Stop Worrying And Love AI

Google just proved how unpredictable artificial intelligence can be – Business Insider

New Medallia Text Analytics Engine Delivers Real-Time Actionable Insight Without Bias… — PALO ALTO, Calif., March 15, 2016 /PRNewswire/ —

Premonition – uses artificial intelligence, predictive analytics.

Mastering the game of Go with deep neural networks and tree search : Nature : Nature Publishing Group

Go champion Lee Se-dol strikes back to beat Google’s DeepMind AI for first time | The Verge

AlphaGo shows its true strength in 3rd victory against Lee Sedol

AlphaGo races ahead 2–0 against Lee Sedol

AlphaGo – Wikipedia, the free encyclopedia

Mustafa Suleyman on Twitter: "Huge milestone in AI! AlphaGo beats the world champion Lee Sedol! We made history! What an incredible moment!:-)"

AlphaGo vs Lee Sedol: Game 1 – Video Commentary

Will AI Surpass Human Intelligence? Interview with Prof. Jürgen Schmidhuber on Deep Learning

Lawrence Lundy (@lawrencelundy) | Twitter

This AI tells you where to invest your money by analyzing the Internet

Artificial intelligence brings its brains and money to London | Technology | The Guardian

My Links

Stay tuned!

Angel “Java” Lopez

March 28, 2016

Building A Blockchain (2)

Previous Post
Next Post

In the past days, I wrote a first implementation of a blockchain, using TDD (Test-Driven Development). Simplicity guides my decision: the blockchain is in-memory, and blocks are identified by number and a hash. Two blocks with number 42 are differente blocks if they have different hashes. A block has the parent block hash (the parent block number is deduced, it’s the block number minus one). A genesis block has number 0, and null parent hash. In this way, I have all the ingredients to build a blockchain, from genesis block to best block, chaining the blocks using their numbers and hashes.

I have a class BlockChain (yes, I prefer the mixed case name). There is a method to add a new block to the blockchain. It controls the new block has as parent the current best block in the blockchain.

But there are other nodes, that send other blocks, that can or cannot be added to the blockchain. How to process those blocks? I collect the blocks that cannot be added to the current blockchain in other objects, I call them blockbranch:

In the second blockbranch, parent block for block 41 is unknown, so, the blockbranch is waiting for the arrival of that block. The first blockbranch is connected to blockchain, as an alternative branch. But is has a height less than blockchain height.

A block branch has one or more consecutive blocks. The blocks are not part of the current blockchain. But they are proto-blockchain.

In the second blockbranch of the above figure, parent block for block 41 is unknown, so, the blockbranch is waiting for the arrival of that block. The first blockbranch is connected to blockchain, as an alternative branch. But is has a height less than blockchain height.

When I have sufficient blocks in a block branch (maybe, connect the bottom of the blockbranch to an existing block in another blockbranch or in the current blockchain), and I can build a list of blocks from genesis to the block in block branch, the branch is a candidate to be the new blockchain. Suppose a new block arrives:

The new block can be added to the second block branch, and it has an existing parent in the current blockchain. So, the block branch now has a complete path of block from genesis.

If the block branch is valid (applying their blocks to a known valid state at end of main block 39), and its height is greater than the current blockchain, the block branch is promoted to be the new blockchain:

The process works even if the new blocks arrives in random order. To manage the creation, growth, and promotion of blockchain and related blockbranches, I have a separate object, of class BlockProcessor, in charge of all this orchestration. The processor receives the new blocks, and send them to the corresponding blockchain or branch. Then, it can detect any new connection between branches, and the formation of branches that can be promoted to blockchains.

In the next post: details of a DSL (Domain Specific Language) I’m using to test different scenarios for the block processor.

Stay tuned!

Angel “Java” Lopez

March 21, 2016

Building a Blockchain (1)

Filed under: Bitcoin, Blockchain, C Sharp, Ethereum, Open Source Projects — ajlopez @ 8:50 am

Next Post

In the past month, I started to work at Rootstock dev team, a very interesting project involving smart contracts over distributed ledgers. In recent weeks, I studied about Bitcoin, Ethereum, and cryptocurrencies. I read many papers, books, and reviewed some code implementation. My links:

I want to describe the essential elements of a distributed blockchain, and its importance. I hope to write source code implementing those ideas, in a simple way, grasping what is the core of all implementations.

A blockchain is a list of blocks, starting from the first one, called the genesis block:

A block has information. In crypto-currencies, that information is usually called transactions:

A transaction describe, in such domains, a transference of crypto-currency, named bitcoins or ether or whatever. But the essence is: a transaction is a piece of information that describe the change of world state.

There is an initial world state after the appearance of the genesis block, and each block, having 0 or more transactions (and, usually, a block finalization implicit transaction), ALTERS the world state:

The transactions should be valid: no transaction is allowed to transform the world state into an invalid one. A typical example of an invalid transaction: one than transfer crypto-currencies from an inexistent account, or from an account with insufficient funds.

The system is not running in one dedicated server. Instead, a network of independent machines is running the software, called the nodes, running the client software (“client” name is a bit confused, because implies the existent of a “server”, but no: each node is the client of other nodes).

Nodes are connected to some other nodes, and the network could have hundreds or thousands of nodes.

There are new transactions that are injected in the system, using specialized software. A node can received a new transaction, and send it to its neighbors:

Some specialized nodes, having all the resources to validate and execute transactions, generates new blocks, containing zero or more transactions. In bitcoin and similar systems, there are economics incentives for such block producers, called miners. The miners gain crypto-currencies, for each created block, and collecting fees from mined transactions.

When a miner (say, N2) produces a new block, it sends it to their neighbor nodes, eventually reaching the whole network:

Many nodes keep the full blockchain, and at receiving a new block, they adds it to its own version of the blockchain, if the block is valid. But sometimes, there are many competing blocks to be added:

And one part of the network could have a blockchain different from the blockchain of other nodes:

In these cases, there is an algorithm to reach consensus. Once the consensus is reached, the blockchain is a distributed one (many nodes have its content and world state), and the mined transactions are accepted in the distributed version.

There are many details to be discussed:

– When a block is valid?
– When a transaction is valid?
– How to generate a transaction? (a transaction moving value from one account to another cannot be generated by anyone, only for the giving account owners)
– How to reach consensus?
– How to store the blockchain?
– How to store the state after each block transactions execution?
– How to transmit the transactions and mined blocks from node to node?

And I want to write some example code, giving a minimal and essential. I created a C# class library. It is being writing using TDD (Test-Driven Development):

Stay tuned!

Angel “Java” Lopez

March 18, 2016

Ethereum: Links, News And Resources (2)

Filed under: Bitcoin, Blockchain, Ethereum, Links — ajlopez @ 8:35 am

Previous Post
Next Post

Bankchains Could Be A Mix of Bitcoin And Ethereum Technology – The Merkle

ethereum/go-ethereum: Official golang implementation of the Ethereum protocol

Ethereum Foundation Appoints ?Dr. Christian ?Reitwiessner to C Team Leader –

obscuren/mutan: Compiler & Language definition for the Ethereum project

Solidity realtime compiler and runtime

Gavin Wood

How to Mine Ethereum on a Windows PC — 6 Steps – YouTube

DEVCON1: Ethereum for Dummies – Dr. Gavin Wood – YouTube

Ethereum Will Arrive (and 15 Other Blockchain Predictions for 2016) – CoinDesk

What is Ethereum?

Ethereum SKYROCKETS: Now #2 Cryptocurrency Behind Bitcoin – YouTube

Ethereum for Investors – Introduction [Part I] – YouTube

Vitalik Buterin on Singularity 1 on 1: Ethereum is a Decentralized Consensus Platform – YouTube

Ethereum (ETH) price, charts, and info | Crypto-Currency Market Capitalizations

My Links

Stay tuned!

Angel “Java” Lopez

March 12, 2016

Distributed Computing: Links, News And Resources (7)

Filed under: Distributed Computing, Links — ajlopez @ 4:11 pm

Previous Post

mateodelnorte/servicebus · GitHub

Return of the Borg: How Twitter Rebuilt Google’s Secret Weapon | Wired Enterprise |

2011 GAFS Omega John Wilkes – YouTube

The history of Hadoop: From 4 nodes to the future of data — Tech News and Analysis

Understanding the Parallelism of a Storm Topology – Michael G. Noll

Gluster Community Website
GlusterFS is an open source, distributed file system capable of scaling to several petabytes (actually, 72 brontobytes!) and handling thousands of clients.

Introducing Akka – Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors ?

Making reliable distributed systems in the presence of sodware errors

Pomelo home
distributed game server framework for node.js

Design Alternatives for Parallel and Distributed Blackboard Systems

Zipkin: a Distributed Tracing Framework

Puppet Labs: IT Automation Software for System Administrators

Remoting (Scala) — Akka Documentation

Let it crash • Balancing Workload Across Nodes with Akka 2

Distributed MapReduce implementation for JavaScript that runs on the worlds largest computational network. Consumer PCs.

Federation is inspired by Akka and Erlang, and borrows some semantics from the actor model. While there are actors, many features familiar to Akka and Erlang are not included. Federation prioritizes being useful to the Node.js community over being faithful to the pure actor model.

Twitter’s programmers speed Hadoop development | Big Data – InfoWorld

bigcompany/big · GitHub

Remote multi-server automation tool

GPU Technology Conference Agenda Chocked Full of Supercomputing Sessions |

My Links

Keep tuned!

Angel “Java” Lopez

March 11, 2016

Ethereum: Links, News and Resources (1)

Filed under: Bitcoin, Blockchain, Ethereum, Links — ajlopez @ 9:18 am

Next Post

Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, fraud or third party interference.

White Paper · ethereum/wiki Wiki


ethereumjs/node-blockchain-server: a simple blockchain server (downloads block and serves them, doesn’t do state transitions)

Ethereum – YouTube

The Ethereum Launch Process – Ethereum Blog

Proof-of-stake – Wikipedia, the free encyclopedia


Vapor No More: Ethereum Has Launched | TechCrunch

Ethereum – Facebook

Ethereum – Wikipedia, the free encyclopedia

Vitalik Buterin explains Ethereum – YouTube


Ethereum: the World Computer – YouTube

Ethereum (@ethereumproject) | Twitter

Bitcoin rival Ethereum’s price skyrockets –

Ethereum Price Rise being led by Bitcoin Flight – NEWSBTC

Create a Hello World Contract in ethereum

Press | Ethcore

Six Ethereum Projects and its Five Competitors –

Bitcoin Falls as Ethereum Rises – A Crisis of Governence


My Links

Stay tuned!

Angel “Java” Lopez

March 9, 2016

Docker: Links, News And Resources (4)

Filed under: DevOps, Docker, Links — ajlopez @ 9:19 am

Previous Post

The Docker Virtual Machine Extension for Linux on Azure

How companies will actually use Docker

docker – manage docker containers — Ansible Documentation

Docker, CoreOS, Google, Microsoft, Amazon And Others Come Together To Develop Common Container Standard | TechCrunch

Getting Started with docker

Why Docker is Not Yet Succeeding Widely in Production

What is Docker? |

Happy Ending: An Epic Saga of Guard and Docker

Dockerizing A Node.JS App (again) | If Else


Deploy a Clojure application in Under 1 Minute

CoreOS Inc, Releases ‘Tectonic Preview’ Commercial Kubernetes v1 Platform

Elixir, Docker and PG2

Running a Rails Development Environment in Docker | via @codeship

My Links

Stay tuned!

Angel “Java” Lopez

March 6, 2016

New Month’s Resolutions: March 2016

Filed under: C Sharp, Crystal, JavaScript, NodeJs, Open Source Projects — ajlopez @ 4:01 pm

A new month starts, time to write the new resolutions, but first, review the previous ones.

– Improve AjGenesisNode-Express [pending]
– Work on CrysJS [complete] see repo
– Work on CrysSharp [pending]
– Work on Memolap [pending]
– Work on SimpleMemolap [pending]
– Improve my SimpleGA samples [pending]
– Improve SharpGo [complete] see repo
– Improve Husky [pending]
– Work on GoLin [pending]
– Improve ImmuO [complete] see repo
– More ReactJS samples [pending]
– Improve Aktores [pending]
– Improve ErlSharp [pending]

It was a month to start a new job, an very interesting project related to Ethereum. Additionally, I worked on:

– Improve RuScript [complete] see repo
– Start EthSharp, Ethereum-like node in C# [complete] see repo
– Start EthSharpVm, Ethereum-like virtual machine, in C# [complete] see repo
– Improve ElixirJS [complete] see repo
– Improve SimpleForth [complete] see repo
– Start CrLisp [complete] see repo

My new resolutions:

– Improve AjGenesisNode-Express
– Work on CrysJS
– Work on CrysSharp
– Improve my SimpleGA samples
– Work on SharpGo
– Work on EthSharp

Stay tuned!

Angel “Java” Lopez

March 4, 2016

Docker: Links, News And Resources (3)

Filed under: DevOps, Docker, Links — ajlopez @ 9:24 am

Previous Post
Next Post

Automate Your Dev Workflow with Docker – via @codeship | via @codeship

DockerCon Europe keynote: State of the Art in Microservices by Adrian Cockcroft (Battery Ventures) | Docker Blog

Virtual Academy: Exploring Microservice Architecture | Microsoft Azure Blog

How can we Build Better Complex Systems? Containers, Microservices, and Continuous Delivery. – High Scalability –

Easy Docker on Microsoft Azure by Jeff Mendoza & Nik Garkusha (Microsoft) – YouTube

Docker Client for Windows is Now Available | Microsoft Azure Blog

StrongLoop | New StrongLoop Process Manager Features for Running Node.js in Production Including Docker Support

How to Run ASP.NET vNext in Azure Using Docker Containers | Visual Studio Germany | Channel 9

Getting Started with Golang on Docker | Tutum Blog

Advanced Java Application Deployment Using Docker | Tutum Blog

Here’s how big Docker got last year | VentureBeat | Cloud | by Jordan Novet

StackStorm | Leaders in Cloud Infrastructure Solutions

My Links

Stay tuned!

Angel “Java” Lopez

« Newer PostsOlder Posts »

The Shocking Blue Green Theme. Create a free website or blog at


Get every new post delivered to your Inbox.

Join 73 other followers