2016-11-02

Javascript Virtual DOM Framework Benchmark

Recently I found a framework benchmark for javascript (round4 2016-09-12), it shows a lot information. The fastest ranker are:

Framework Version Runtime Ratio (% slower than fastest) MB Start MB 1K rows
vanillajs
1 2.98 4.85
inferno 1.0.0-beta9 3 3.19 6.60
vanillajs-keyed
4 2.98 4.81
dio.js 3.0.5 4 3.19 7.09
domvm 2.0.0-beta 10 3.15 7.43
kivi 1.0.0-rc2 17 3.17 6.69

Also there are another benchmark (this have fewer framework, last result at this time):

Framework Init Time First Render Time Overall Time
kivi[adv] 1.0.0 2,185 25,795 527,703
Inferno 0.7.22 3,340 31,780 553,513
Imba 0.14.3 15,920 26,250 569,895
Bobril 4.38.0 3,430 26,255 682,847
Vidom 0.3.16 3,400 38,220 729,882
Maquette 2.3.3 1,955 27,410 733,165
Snabbdom 0.5.0 2,565 34,710 759,481
React 15.3.1 38,640 56,065 926,403
React-lite 0.15.6 6,345 40,725 1,105,627
Preact 5.4.0 2,550 53,585 1,150,506
Vanilla[innerHTML] 1.0.0 1,790 16,925 1,500,676
Deku 2.0.0-rc16 3,285 45,950 1,598,787
Mercury 14.1.0 2,840 41,325 2,115,253
yo-yo 1.2.2 1,825 21,835 2,295,505

Apparently there are a lot of them around the internet.
Of course you can build your own framework, here's the tips if you plan doing so.

2016-10-01

LXC Web Panel

As you (probably) already know, LXC (Linux Containers) or OpenVZ an operating-system-level virtualization is really faster than hardware virtualization, see the comparison. For those who hate CLI, you can use web interface called LXC Web Panel (for LXC 0.7 to 0.9, or newer fork 1.0+ here) to manage your containers:

wget https://lxc-webpanel.github.io/tools/install.sh -O - | sudo bash

This software only works on Ubuntu 12.04 or later. Despite of its performance, of course there are limitations, such as: you can only use host OS and architecture on guest. You can find more info on their website or this blog post.




So why LXC instead of Docker or Virtualization? because it's simpler :3 yes, both are different kind of animal, don't forget to check LXD and other alternatives too.



2016-07-14

ZSH is better BASH!

ZSH is better BASH, you should really change to newer and better shell.
Why it's better? it has better completion, support right prompt, see this presentation for more


Here's how to install it on ArchLinux:

pacman -S zsh zsh-completions
chsh -s `which zsh`
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Oh-My-Zsh is package manager for zsh, you can change theme, add more aliases, for example:

plugins=(git git-extras redis-cli sudo systemd archlinux)

You can also install another theme, such as bullet-train:

mkdir $ZSH_CUSTOM/themes
cd $ZSH_CUSTOM/themes
aria2c "http://raw.github.com/caiogondim/bullet-train-oh-my-zsh-theme/master/bullet-train.zsh-theme"

Then set on ~/.zshrc:

BULLETTRAIN_DIR_EXTENDED=2
ZSH_THEME="bullet-train"

Remap Capslock to Backspace on Linux

Greatest idea IMHO from Colemak keyboard layout is replacing capslock with backspace key.


Here's how to do it in linux:

setxkbmap -option caps:backspace

But if you really need capslock, you can set pressing both shift key:

setxkbmap -option shift:both_capslock

These can be set on the ~/.xprofile file. For more xkeyboard tips, see this blog post.

On Mac OSX you can use Karabiner, for Windows, you look at this blog post.

Btw, have you heard about cheapest mechanical keyboard Nimxo K005?



2016-07-12

Keyboard with built-in Soundcard

I was looking for keyboard with built-in soundcard (not just passthrough), but the moderator deletes both my question and answers. Oh well, I post the updated results here now:

Cooler Master Storm Mech
+ Mechanical
+ White backlight
+ 1ms pooling rate
+ 1.5m cable
+ 553 x 267 x 43 mm
+ 1686 gr
+ 5 macro keys
+ USB 3
official review youtube


Thermaltake eSports Challenger Ultimate
+ Membrane
+ Full color backlight
+ 2ms pooling rate
+ 2m braided cable
+ 505 x 195 x 27 mm
+ Fan
+ 14x5 macro keys
+ 6 multimedia keys
official youtube


Logitech G510s
+ Membrane+ Full color backlight
+ 2ms pooling rate
+ 6 keys anti-ghosting
+ 2m cable
+ 557 x 215 x 31 mm
+ 1205 gr
+ Built-in LCD
+ UV Coated keys
+ 18 macro keys
+ 4 media keys
official youtube


Thermaltake eSports Poseidon Z Forged
+ Mechanical
+ Blue backlight
+ 1ms pooling rate
+ 104 keys anti-ghosting+ 1.8 m cable
+ 503 x 156 x 43 mm
+ 1474 gr
+ 10 macro keys
official review youtube


Thermaltake eSports Meka G-Unit
+ Mechanical
+ White backlight
+ 46 keys anti-ghosting
+ 1ms pooling rate
+ 554 x 271 x 70 mm
+ 1.8m braided cable+ 12 macro keys
+ 7 media keys
official youtube


What's the best? dunno guys XD never tried any of them.

2016-07-03

If Operating Systems ran The Airlines

Copied from https://telegram.me/programmerjokes

UNIX Airways 

Everyone brings one piece of the plane along when they come to the airport. They all go out on the runway and put the plane together piece by piece, arguing non-stop about what kind of plane they are supposed to be building.

Air DOS 

Everybody pushes the airplane until it glides, then they jump on and let the plane coast until it hits the ground again. Then they push again, jump on again, and so on...

Mac Airlines 

All the stewards, captains, baggage handlers, and ticket agents look and act exactly the same. Every time you ask questions about details, you are gently but firmly told that you don't need to know, don't want to know, and everything will be done for you without your ever having to know, so just shut up.

Windows Air 

The terminal is pretty and colourful, with friendly stewards, easy baggage check and boarding, and a smooth take-off. After about 10 minutes in the air, the plane explodes with no warning whatsoever.

Windows NT Air 

Just like Windows Air, but costs more, uses much bigger planes, and takes out all the other aircraft within a 40-mile radius when it explodes.

Windows XP Air 

You turn up at the airport,which is under contract to only allow XP Air planes. All the aircraft are identical, brightly coloured and three times as big as they need to be. The signs are huge and all point the same way. Whichever way you go, someone pops up dressed in a cloak and pointed hat insisting you follow him. Your luggage and clothes are taken off you and replaced with an XP Air suit and suitcase identical to everyone around you as this is included in the exorbitant ticket cost. The aircraft will not take off until you have signed a contract. The inflight entertainment promised turns out to be the same Mickey Mouse cartoon repeated over and over again. You have to phone your travel agent before you can have a meal or drink. You are searched regularly throughout the flight. If you go to the toilet twice or more you get charged for a new ticket. No matter what destination you booked you will always end up crash landing at Whistler in Canada.

Linux Air 

Disgruntled employees of all the other OS airlines decide to start their own airline. They build the planes, ticket counters, and pave the runways themselves. They charge a small fee to cover the cost of printing the ticket, but you can also download and print the ticket yourself.

When you board the plane, you are given a seat, four bolts, a wrench and a copy of the seat-HOWTO.html. Once settled, the fully adjustable seat is very comfortable, the plane leaves and arrives on time without a single problem, the in-flight meal is wonderful. You try to tell customers of the other airlines about the great trip, but all they can say is, "You had to do what with the seat?"

Example:
Sorry, this is the best analogy on the subject of linux, has been around for a long time, and is anonymous.

BTW, linux is the kernel, GNU/GPL software make up the rest of the OS and apps.  GNU/Linux is the way lawyers will say it in court.