Quantcast
Channel: Programming Rants
Viewing all 204 articles
Browse latest View live

EasyEngine: WordPress made easy

$
0
0
So, newbies out there, for those that have a root server access or VPS, and you want to create a blog. There is a tool called EasyEngine that could help you (automate) setup Nginx (not Apache), PHP (or PHP7/HHVM), MariaDB/MySQL database, Postfix mail transfer agent, WordPress, WP Super Cache (or W3 Total Cache, Nginx Cache, WP Redis) on Ubuntu or Debian operating system.

There's a lot more it can offer:

How to install EasyEngine?

wget -qO ee rt.cx/ee && sudo bash ee

What's we must use this? it saves time (automated install, automatic update), best practice (Nginx instead of Apache, HHVM/PHP7 instead of PHP5, caching), configuration backup (using Git)


For more information you can visit their website https://easyengine.io/

But wait kiz, you hate PHP right? why you endorse this?
at least this ISfar better than poor performance/neglected/insecure/lousy crap configuration/choice that I always see in the past.

Flowchart to choose your programming language

$
0
0
Just now, I found a cool site to generate flowchart from source code (just like dot program):

(click for larger picture)

Anyway this just a joke, just like before (if programming language were religion/woman), may odds be in your favor..

Btw here's the code if you want to modify.. please use http://pastie.org if you want to do a long comment containing source code..

Choosing Programming language flowchart;
if(I really really care 
about runtime performance) {
  if(I am masochist..) {
    if(I like Mozilla..) {
      Use Rust;rust-lang.org
    } else {
      Use C++;cplusplus.com
    }
  } else if(I don't want 
  to learn something new..) {
    Use C;cprogramming.com
  } else if(I like long lines..) {
    Use Java;java.com
  } else if(I like FP?) {
    if(But I'm not masochist..) {
      Use Scala;scala-lang.org;
    } else if(I like parentheses..) {
      Use Clojure;clojure.org
    } else if(I like Microsoft) {
      Use FSharp;fsharp.org;
    } else {
      Use Haskell;haskell.org;
    }
  } else { 
    if(I like Microsoft..) {
      if(I hate C++) {
        if(My computer is ancient..) {
          Use VB6;
        } else {
          Use VB.NET;
        } 
        vbforums.com;
      } else {
        Use CSharp;csharp-station.com;
      }
    } else if(I like Facebook..) {
      Use Hack;hacklang.org;
    } else if(I like Apple..) {
      if(I'm a bit masochist..) {
        Use Objective-C;developer.apple.com;
      } else {
        Use Swift;swift-lang.org;
      }
    } else if(I like Google..) {
      if(But I also like java 
      and javascript..) {
        Use Dart;dartlang.org;
      } else { 
        Use Go;golang.org;
      }
    } else {
      // you can also use Lazarus
      // lazarus.freepascal.org
      Use Delphi;embarcadero.com;
    }
  } 
} else {
  if(I don't want to install a thing..) {
    if(I use linux, mac, or win 10) {
      Use Bash;bash-hackers.org;
    } else {
      Use Javascript;javascript.com;
    }
  } else if(I love spaghetti..) {
    if(I don't care about my future..) {
      // Most likely you will be killed by maintainer that reads your code..
      Use Perl;perl.org;
    } else {
      Use PHP;php.net;
    }
  } else if(I want to make game mods..) {
    Use Lua;lua.org;
  } else if(I like indentations..) {
    Use Python;python.org;
  } else {
    Use Ruby;ruby-lang.org;
  }
}

Aww snaps, I forgot to add Elixir, Julia, and Crystal  -_- oh well.. maybe sometime in the future.

If Operating Systems ran The Airlines

$
0
0
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.

Keyboard with built-in Soundcard

$
0
0
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.

Remap Capslock to Backspace on Linux

$
0
0
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?



ZSH is better BASH!

$
0
0
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"

If Programming Language were Musical Instruments

$
0
0
Sauce: http://9gag.com/gag/aM9YOgP
Go would be a drum :3

Best Video about Bitcoin and Blockchain


LXC Web Panel

$
0
0
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.



Rescue the Princess using 8 Programming Languages

Crystal Internal Benchmark (Nov 2016)

$
0
0
Update the snapshot of benchmark by Kostya. See the previous (April 2015) snapshot here.

  • gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
  • Nim Compiler Version 0.14.0 (2016-06-06) [Linux: amd64]
  • Crystal 0.19.2 [d81c32c] (2016-09-16)
  • go version go1.7 linux/amd64
  • gccgo (Ubuntu 4.9.1-0ubuntu1) 4.9.1
  • DMD64 D Compiler v2.068.0
  • gdc (crosstool-NG crosstool-ng-1.20.0-232-gc746732 - 20150830-2.066.1-dadb5a3784) 5.2.0
  • LDC - the LLVM D compiler (0.15.2-beta1)
  • V8 version 3.29.62 (candidate)
  • rustc 1.11.0 (9b21dcd6a 2016-08-15)
  • Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45)
  • Nodejs v7.0.0
  • PyPy 4.0.0 with GCC 4.8.4
  • topaz (ruby-1.9.3p125) (git rev b95c858) [x86_64-linux]
  • ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
  • Python 2.7.6 and  3.5.2
  • rubinius 2.2.10 (2.1.0 bf61ae2e 2014-06-27 JI) [x86_64-linux-gnu]
  • jruby 1.7.20 (1.9.3p551) 2015-05-04 3086e6a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 +jit [linux-amd64]
  • jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]
  • Java version "1.8.0_45" Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
  • julia version 0.4.3
  • clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
  • Mono JIT compiler version 4.0.1 (tarball Tue May 12 15:39:23 UTC 2015)
  • rock 0.9.10-head codename sapphire, built on Wed Jul 1 20:09:58 2015
  • Felix version 15.04.03
  • Q KDB+ 3.3 2015.09.02 Copyright (C) 1993-2015 Kx Systems
  • perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
  • The Glorious Glasgow Haskell Compilation System, version 7.10.2
  • Tcl 8.6
  • jq version 1.3
  • Swift version 2.2-dev (LLVM ae2eb212e4, Clang ef4c02f431, Swift 634acb40a1)
  • Kotlin version 1.0.3 (JRE 1.8.0_45-b14)
  • PHP 7.0.9-1+deb.sury.org~trusty+1 (cli) ( NTS )
  • .Net Core 1.0.0-preview2-003121

Havlak loop finder
LanguageTime, sMemory, MiB
Crystal15.46443.2
Nim Gcc16.59484.3
Nim Clang16.91477.9
C++17.72174.5
D Ldc25.15214.9
D28.90418.2
Go31.26349.9
D Gdc31.79197.6
Scala32.18363.0
Go Gcc32.94365.7
C# Mono40.54270.0
Python Pypy45.51625.9
C# .Net Core61.38388.8
Python396.54724.0

Matrix multiplication
LanguageTime, sMemory, MiB
Julia Native Thr0.11148.3
Julia Native0.31175.8
D Mir GLAS0.3256.7
D Ldc2.0168.9
D2.3071.3
D Gdc2.3373.0
Python Numpy3.0865.3
Java3.50136.2
Scala3.62136.2
Kotlin3.62132.2
C3.6469.2
Nim Clang3.73142.3
Rust3.7476.9
Nim Gcc3.82146.0
Go3.8373.5
Crystal3.8573.9
Go Gcc3.9084.5
Swift4.48110.8
Javascript Node5.9588.3
Javascript V86.8781.5
Python Pypy7.68122.6
C# .Net Core10.8785.7
C# Mono15.1783.6
Julia20.98187.4
Ruby Topaz81.41206.2
Ruby338.4082.8
Python447.3974.0
Ruby JRuby416.12582.4
Ruby JRuby9k467.59608.3
Ruby Rbx591.70325.0
Perl666.46604.1
Tcl1066.66279.9

JSON parse
LanguageTime, sMemory, MiB
D Gdc Fast0.34226.7
C++ Rapid SAX0.721.0
Rust Pull0.78207.9
Rust Struct0.79232.5
C++ Gason0.83582.2
C++ Rapid0.94243.6
Java1.47621.2
Crystal Schema1.93331.2
Rust Value2.511967.0
Perl XS2.68888.4
Crystal3.001115.2
Javascript Node3.21863.7
Crystal Pull3.301.6
Nim Clang4.121089.6
Python3 ujson4.151303.2
Nim Gcc4.461090.1
Python Pypy4.811553.0
Python ujson5.071352.9
Q5.18684.0
Go5.21479.3
C++ LibJson5.492796.3
Clojure5.811148.5
Python35.821037.8
C# .Net Core6.31834.9
Php6.371502.0
Ruby YAJL8.231085.5
Haskell8.3170.5
Python9.851409.1
C# Mono10.57812.1
Julia11.892622.4
D12.421417.1
Ruby12.672013.9
JQ14.921714.5
Scala15.471415.8
C++ Boost16.442915.2
Ruby JRuby9K16.532050.5
Go Gcc17.64473.1
Ruby JRuby21.982761.1
D Gdc25.86926.1
D Ldc27.23919.6
Perl46.021635.4
Ruby Rbx67.134681.0

Base64 encode and decode

LanguageTime, sMemory, MiB
C aklomp SSSE30.9332.3
C1.8532.2
Crystal2.3085.0
D Gdc2.5233.3
Ruby2.73125.3
D Ldc3.1453.1
Perl XS3.6347.9
Rust3.6442.9
Ruby Rbx4.2930.7
Nim Gcc4.6252.7
Nim Clang4.7052.7
Julia4.41190.0
Javascript Node4.76551.5
C++ Openssl5.4565.2
Php6.3453.4
C# .Net Core6.52121.1
D7.1855.3
Tcl7.2066.0
Python Pypy7.32582.3
Python7.6252.6
Go8.0070.0
Python38.1354.5
C# Mono9.0171.7
Java9.06971.2
Kotlin9.75932.9
Scala10.69292.5
Ruby JRuby9K12.16530.6
Ruby JRuby12.65514.9
Perl33.3099.7
Go Gcc39.56185.5
Mandelbrot in Brainfuck
LanguageTime, sMemory, MiB
C++ Gcc20.491.7
Crystal23.131.5
D Ldc24.901.4
Rust25.194.9
D Gdc29.492.4
Nim Gcc31.042.7
Nim Clang37.392.9
Go Gcc37.5911.4
Kotlin40.7934.9
Scala58.51120.12
Java58.86423.9
D Dmd62.691.7
Javascript Node88.3418.6
Go102.852.2
Python Pypy126.4778.9
C# .Net Core142.3017.8
C# Mono147.6912.6
Ruby Topaz305.7938.8

Brainfuck interpreter
LanguageTime, sMemory, MiB
Kotlin1.7828.4
C++ Gcc1.941.0
D Ldc2.020.9
Rust2.494.9
Nim Gcc2.560.7
D Gdc3.051.4
Nim Clang3.090.8
Scala3.43120.12
Crystal3.461.3
Java4.03513.8
Go Gcc4.2010.0
D Dmd5.231.0
Go5.360.9
Javascript V86.537.9
Javascript Node7.3816.9
C# .Net Core16.0316.9
C# Mono19.8614.6
Python Pypy20.6477.9
Ruby Topaz59.5336.5
Ruby Rbx120.3832.3
Ruby Jruby129.75267.6
Ruby Jruby9k134.18286.8
Ruby181.447.2
Python314.794.9
Python3412.135.5

Techempower Framework Benchmark Round 13

$
0
0
After long wait, the latest Techempower Framework Benchmark 13 is out! And just like previous one, Go's fasthttp really really fast. As usual the most important thing is data updates benchmark:


Top ranker in this part (more than 1024 req/s) are GoC++JavaJavascript (NodeJS)PerlC#, ElixirDartScalaPythonClojure, and Groovy (Actually PHP are there below the last one on the picture with 1018 req/s). And for the database part would be: PostgreSQL, MongoDB, and MySQL.

Best Golang IDE: IntelliJ and VSCode

$
0
0
I've been using IntelliJ + go-lang-idea-plugin for years now (because it's currently the best one for almost everything: Ruby, PHP, Python, Javascript, SQL, you name it..), previously it's ok to use SublimeText + GoSublime, or LiteIDE, but today we got another completely working alternative that is also purely free (like IntelliJ Community): VisualStudioCode + lukehoban.Go. Here's how to install in ArchLinux:

yaourt --needed --noconfirm -S --force visual-studio-code 
go get -u -v github.com/nsf/gocode      
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
code

Then press Ctrl+Shift+P, type "Install Extension", type: "Go", done :3

Everything's works fine now:

In my opinion, IntelliJ still the best, but surely I'll be using VSCode when my IntellJ license ends.

Bootstrap Alternative

$
0
0
Today we're gonne see more alternative of css framework such as Bootstrap (and JQuery UI)

Semantic UI

Pure.css (by Yahoo)

Foundation

UIKit


How about a nice Editor for CSS?

EnjoyCSS (web based)

Stylizer (mac, 79$)

MacRabbit Expresso (mac, 75$)

Responsive Site Designer (windows, mac, 189$)

SimpleCSS (windows, mac)

Koala (windows, mac, linux)
if you have trouble running, do this:
sudo ln -s /lib64/libudev.so.1 /lib64/libudev.so.0

StyleMaster (windows, mac, 59$)

Rapid CSS Editor (windows, 29$)

EnginSite CSS Editor (windows, 109$)

HTML Pad (windows, 35$)


Forget about bootstrap, how about if I don't know anything about CSS at all?

CSS Reference

CSS Almanac

Flexbox CheatSheet

Learn CSS Layout

How to Learn CSS in 24 Hours


But what if I want more than just CSS Framework? I demand GUI! (warning: mostly slow load)

Qooxdoo

DHTMLX

Dojo Toolkit

KendoUI

WebIX

WinJS

W2UI

ExtJS ($4000+)

VueJS Components

ReactJS Components


B-b-but I like Bootstrap, is there any GUI Builder?

LayoutIt

BootPly

Brix.io (14$)

JetStrap

PineGrow (desktop,  25$+)

Pingendo (desktop)

BootstrapStudio (25$)

Bootstrap Website Builder (windows, mac)

Lavish (customize color theme from a picture)

BootsWatchr or BootstrapMagic or Cluckles (bootstrap realtime preview)

BootUI (mac, windows, 49$)

Frontenda

Mobirise Website Builder (windows, mac, 145$)

BootstrapEditor (templates)

CodePly

BootTheme

well, that's it for now.. btw here's a comic about fullstack~




How to become AUR package adopter?

$
0
0
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

Installing AeroSpike on ArchLinux

$
0
0
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

Sinatra-like Web Framework Benchmark

Javascript Virtual DOM Framework Benchmark

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

FrameworkVersionRuntime Ratio (% slower than fastest)MB StartMB 1K rows
vanillajs
12.984.85
inferno1.0.0-beta933.196.60
vanillajs-keyed
42.984.81
dio.js3.0.543.197.09
domvm2.0.0-beta103.157.43
kivi1.0.0-rc2 173.176.69

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

FrameworkInit TimeFirst Render TimeOverall Time
kivi[adv] 1.0.02,18525,795527,703
Inferno 0.7.223,34031,780553,513
Imba 0.14.315,92026,250569,895
Bobril 4.38.03,43026,255682,847
Vidom 0.3.163,40038,220729,882
Maquette 2.3.31,95527,410733,165
Snabbdom 0.5.02,56534,710759,481
React 15.3.138,64056,065926,403
React-lite 0.15.66,34540,7251,105,627
Preact 5.4.02,55053,5851,150,506
Vanilla[innerHTML] 1.0.01,79016,9251,500,676
Deku 2.0.0-rc163,28545,9501,598,787
Mercury 14.1.02,84041,3252,115,253
yo-yo 1.2.21,82521,8352,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.

Websocket Benchmark

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

Round #1

LanguageClientsRAM (MB)RAM / Client (KB)LOCLibrary
C++33,00060018.62140https://github.com/zaphoyd/websocketpp
Clojure 27,0001,50056.8950http://www.http-kit.org/
Elixir24,0001,90081.0720http://www.phoenixframework.org/
Go24,00080034.13100Built-in golang.org/x/net/websocket
NodeJS 13,00030023.6331https://github.com/websockets/ws
JRuby1,100650605.0920http://rubyonrails.org/
Ruby500150307.2020http://rubyonrails.org/

Round #2

LanguageVersionThreadClientsClients (without Payload)
Javascript / Node / uws6.6.0
26,000
Haskell - no chan1.2
25,00037,000
C++ / uWebSockets / RapidJSON5.4.0124,00035,000
Go / Websocket1.7
22,00039,000
C++ / Crow / RapidJSON5.4.0120,000
Go / Gorilla1.7
20,000
Java / Netty1.8.0_101
20,000
Rust - ws1.11.0
20,000
Elixir / Plug1.3.2
19,000
Java / Undertow1.8.0_101
19,000
NodeJS / Faye - clustered6.6.0
19,000
Rust - scopedpool-ws1.11.0
19,000
Clojure / Java1.8.0_101
18,000
C++ / WebsocketPP / jsoncpp5.4.0817,000
JRuby / Eventmachine9.1.2.0
17,000
Rust - threadpool-ws1.11.0
17,000
Elixir / Phoenix1.3.2
15,000
C++ / Crow / RapidJSON5.4.0814,00042,000
Javascript / Node / ws6.6.0
14,000
Javascript / Node / ws - clustered6.6.0
14,000
C++ / WebsocketPP / jsoncpp5.4.0113,000
Haskell1.2
13,000
NodeJS / Faye6.6.0
13,000
Ruby / Eventmachine2.3.1p112
13,000
Javascript / Node / uws - clustered6.6.0
12,000
JRuby / Rails9.1.2.0
1,000
Ruby / Rails2.3.1p112
500

You can see the raw result here.


Faster than Go? Yes, plenty

$
0
0
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..
Viewing all 204 articles
Browse latest View live