2017-01-02

If Programming Language were Humans

Taken from here and nixCraft page (click there to see larger text).


  • Python: my formatting is my syntax!
  • Javascript: I'm technically functional
  • PHP: can I GET guys anything?
  • Haskell: (lambda x.x am pure)(i)
  • C/C++: If you're not allocating memory, you're not living!
  • C#: I am nothing like my father.
  • Erlang: Destroy one of my processes and I will only grow stronger
  • Elixir: I Draw my Eldritch Power From all my process-chans
  • Rust: I'll be designated driver tonight!
    Programmer: we know
    Rust: Don't talk while eatingyou could choke and die haha
  • Fortran: I am unparalled in numerical ^ scientific computation!
  • Matlab: Come with me if you want to research
  • Lua: I'll take things from here
  • Lisp Dialects: Trust in the recursion
    Racket: learning is fun

Ah there are some updates!























2017-01-01

Redis GUI

Redis is one of full featured in-memory database with optional persistence and replication. Redis support 5 kind of data types: key-value (SET, GET), hashtable (HSET, HGET), linkedlist (L/RPUSH, L/RPOP), sets (SADD, SREM) and sorted/scored-sets (ZADD, ZREM).



Looking for GUI for redis? Thy these apps, from the best to the least:

Redis React

Built using Mono + ReactJS. Just download and Run (install Mono first if you are using Linux).

Redis Desktop Manager

Built using C++ and Qt5.

yaourt --needed --noconfirm -S --force redis-desktop-manager

FastoRedis

A fork of FastoNoSql, I don't know what this one built with, since the github repository doesn't have the source.

Redis Commander

Built using NodeJS

sudo npm install -g redis-commander

Rebrow

Built using Python2 and Flask Framework. Just clone the repository, install its dependencies and run.

Btw, happy new year :3

2016-12-26

2016-12-09

Javascript ES6 to ES5 Transpiler

When you are so eager to use ES6 features but you know that most browsers not yet implement all ES6 features completely (that's why there are also HTML5 pollyfills). Here's the list of transpiler to convert Javascript ES6 to ES5:
Almost 2 years ago comparison between Babel and Termi. Oh and yes, you can use Babel with WebStorm.
Note that every transpilers (CoffeeScript, TypeScript, Elm, Haxe, etc) suffer the same problem: compile duration (hey, one more thing to do [=minify] before testing/deploying) and hard debugging (easier if you use source maps, only for JS transpilers, I don't know if these things exists for transpiler for other language). Still I wish for wAsm to come faster. Btw I learned ES6 just for react-native-web, otherwise I would always still stick with ES5.


2016-12-08

Programming Language Libraries

Woot woot! I found a website that crawls for libraries *__*)b
And I think it awesome that Go got first rank.

By Language/Editor

By Package Manager, note:

go (go get), npm (js), rubygems (ruby), maven (java), packagist (php), pypi (python), nuget (.net, c#, vb.net, and f# mostly), bower (js), wordpress (php), cpan (perl), cocoapods (objective-c and swift), clojars (clojure), meteor (js), cran (r), hackage (haskell), atom (text editor), cargo (rust), homebrew (osx), emacs (text editor), swiftpm (swift), hex (erlang, elixir), pub (dart), sublime (text editor), platformio (iot), julia (julia), carthage (objective-c, swift), dub (d), haxelib (haxe), jam (js), elm (elm), alcatraz (xcode ide), nimble (nim), inqlude (qt), shards (crystal)

2016-12-02

List of Tech Migrations

I'm quite fascinated with the decision (and obviously the effort) of leaving a language or database to another technology, here's the list that I found:
So many migrating to Go ^^. If it's not about migration, there's a lot more here that apparently choose Go (interviews, from X to Go, and also more here).

NOTE: this list will be no longer updated, you can see the lastest changes on github repo so anyone can contribute/update.

Btw why not MongoDB or CockroachDB.. but I think now they are getting better.


If you found any more news like this, paste the link on the comment, I'll gladly add them on the list.

2016-12-01

Faster than Go? Yes, plenty

Is there anything that faster than Go? yes, there are plenty, but I'm not sure if it would be fun to code with.. What are they?

G-WAN

G-WAN is closed-source web application server (not a language like Go). If I'm not mistaken G-WAN caches GET request, so second hit within few ms won't execute the backend function, practically this is cheating for benchmark (not merged), but for real application this feature quite great (can cope up with DDOS attack) :3 Btw did I mention that this web application server support whole lot of language? asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby, and Scala with CGI-like writing. One note that you must really learn how HTTP works (parsing header, setting cookie, parsing POST parameters, etc) if you want to use this.


I don't really know if this suffer the same problem similar to others that use CGI instead of FastCGI: connection pooling to database (but we can use pgpool).

LWAN

LWAN is also web application server that uses C, can be used with LuaJIT (fast implementation of Lua). For the framework you can use Sailor (Example).



PyParallel 

PyParallel is a programming language implementation, forked from Python3, removes GIL (Global Interpreter Lock).


Julia

Julia is one awesome programming language that uses LLVM, it focuses


Actually there's a lot more implementation that faster than Go for certain (or all) cases, such as: C, C++, Ada, Rust, Java, and Fortran, be sure to check on BenchmarkGame site.


But, don't choose a language or web framework or web application platform just based on performance, there's a lot of things to consider, for example:
  • either it's waste of time to work with (since you must do many things manually aka there's no framework or so little libraries/function yet)
  • how easy it's to train a new programmer to work with you or continue the project
  • what's the continuity of the technology (if the project abandoned by the author/maintainer)
  • build/compile duration
  • etc..
If you are looking for next hype? try Elixir and Phoenix.

2016-11-30

Websocket Benchmark

Once again, today I found another benchmark, about websocket:

Round #1

Language Clients RAM (MB) RAM / Client (KB) LOC Library
C++ 33,000 600 18.62 140 https://github.com/zaphoyd/websocketpp
Clojure  27,000 1,500 56.89 50 http://www.http-kit.org/
Elixir 24,000 1,900 81.07 20 http://www.phoenixframework.org/
Go 24,000 800 34.13 100 Built-in golang.org/x/net/websocket
NodeJS 13,000 300 23.63 31 https://github.com/websockets/ws
JRuby 1,100 650 605.09 20 http://rubyonrails.org/
Ruby 500 150 307.20 20 http://rubyonrails.org/

Round #2

Language Version Thread Clients Clients (without Payload)
Javascript / Node / uws 6.6.0
26,000
Haskell - no chan 1.2
25,000 37,000
C++ / uWebSockets / RapidJSON 5.4.0 1 24,000 35,000
Go / Websocket 1.7
22,000 39,000
C++ / Crow / RapidJSON 5.4.0 1 20,000
Go / Gorilla 1.7
20,000
Java / Netty 1.8.0_101
20,000
Rust - ws 1.11.0
20,000
Elixir / Plug 1.3.2
19,000
Java / Undertow 1.8.0_101
19,000
NodeJS / Faye - clustered 6.6.0
19,000
Rust - scopedpool-ws 1.11.0
19,000
Clojure / Java 1.8.0_101
18,000
C++ / WebsocketPP / jsoncpp 5.4.0 8 17,000
JRuby / Eventmachine 9.1.2.0
17,000
Rust - threadpool-ws 1.11.0
17,000
Elixir / Phoenix 1.3.2
15,000
C++ / Crow / RapidJSON 5.4.0 8 14,000 42,000
Javascript / Node / ws 6.6.0
14,000
Javascript / Node / ws - clustered 6.6.0
14,000
C++ / WebsocketPP / jsoncpp 5.4.0 1 13,000
Haskell 1.2
13,000
NodeJS / Faye 6.6.0
13,000
Ruby / Eventmachine 2.3.1p112
13,000
Javascript / Node / uws - clustered 6.6.0
12,000
JRuby / Rails 9.1.2.0
1,000
Ruby / Rails 2.3.1p112
500

You can see the raw result here.


2016-11-29

Sinatra-like Web Framework Benchmark

So today I come across some benchmark about sinatra-like web framework at 20 July 2016, it compares:



You can see the details here.

2016-11-28

Installing AeroSpike on ArchLinux

As benchmarked previously (more than half year ago since this blog post written), AeroSpike has awesome search/retrieval performance. In this tutorial we will learn how to install AeroSpike on ArchLinux

wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/tgz'
tar -xvfz aerospike.tgz
cd aerospike-server
./bin/aerospike init

Configure the etc/aerospike.conf into something like this:

service {
  user YOUR_USERNAME
  group YOUR_GROUP
  run-as-daemon
  paxos-single-replica-limit 1 
  pidfile /home/YOUR_USERNAME/aerospike-server/var/run/aerospike.pid
  transaction-queues 8
  transaction-threads-per-queue 8
  transaction-pending-limit 255 # HOT KEY ERROR WORKAROUND FOR INCREMENT
  proto-fd-max 15000
  work-directory /home/YOUR_USERNAME/aerospike-server/var
}

logging {
  file /home/YOUR_USERNAME/aerospike-server/var/log/aerospike.log {
    context any info
  }
}

mod-lua {
  system-path /home/YOUR_USERNAME/aerospike-server/share/udf/lua
  user-path /home/YOUR_USERNAME/aerospike-server/var/udf/lua
}

network {
  service {
    address any
    port 3333 # USE DIFFERENT PORT IF CONFLICT 
    #reuse-address # COMMENT/REMOVE THIS PART
  }
  heartbeat {
    mode multicast
    multicast-group 239.1.99.222 # CHANGE address INTO multicast-group
    port 9918
    interval 150
    timeout 10
  }
  fabric {
    port 3331 # USE DIFFERENT PORT IF CONFLICT 
  }
  info {
    port 3332 # USE DIFFERENT PORT IF CONFLICT 
  }
}

namespace test {
  replication-factor 2
  memory-size 4G # CHANGE DEPENDS ON YOUR RAM
  default-ttl 0 # CHANGE 30 days, use 0 to never expire/evict.
  storage-engine device {
    file /home/YOUR_USERNAME/aerospike-server/data
    filesize 128M # MAX SIZE OF EACH FILE
  }
}

Then start the server:

./bin/aerospike restart
tail -f var/log/aerospike.log &
./bin/aerospike status

First and last command should show something like this:

info: stopped
info: started
info: process running

Done, now you can test your aerospike server using any client :3

2016-11-25

How to become AUR package adopter?

AUR is ArchLinux User Repository, similar to Ubuntu's Launchpad.
To adopt an orphaned package it's easier than you think! adopt now :3


What you need to do is register, find an orphaned package, then click on the "Adopt Package" link.


Don't forget to set your public key on your "My Account" menu.


After that you can clone the repository, see "Git Clone URL" on the first line of the package, edit and reupload:

git clone ssh://aur@aur.archlinux.org/bla.git
# do some changes on PKGBUILD
git add .
git commit -m 'updated bla package to version X'
git push origin master

Done :3 you have successfully adopt and maintain a package :3