Saturday, December 9, 2017

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try.
// JS
function foo () {
  bar(1)
}
# Ruby
def foo
  bar(1)
end
; Clojure
(defn foo [] 
  (bar 1))

As you can see from the images below, Clojure doesn't allow you to refer to an undeclared symbol. I believe this takes away quite a bit of typing error issues.

Wednesday, July 12, 2017

Config number of file descriptors on Linux

Check file descriptor limit for a process. Vary depending on owner of the process
$ cat /proc/{process-id}/limits
Check current number of file descriptors of a process
$ sudo ls /proc/{process-id}/fd | wc -l
Set file descriptors limit for a user at /etc/security/limits.conf
*    soft nofile 64000
*    hard nofile 64000
root soft nofile 64000
root hard nofile 64000
Check system file descriptor limit
$ cat /proc/sys/fs/file-max
Check current number of system file descriptors
$ cat /proc/sys/fs/file-nr 

Credits:

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try. // JS function foo () {   bar(1) } # Ruby def foo   bar(1) end ; Clojure (defn foo []    (bar 1)) As yo...