The Internet and Hieronymus Bosch (2011) [pdf] - <AUTHOR> http://lewis.seas.harvard.edu/files/harrylewis/files/internet_and_hieronymus_bosch.pdf

<comment><USER2> The plate is omitted but the painting mentioned (The Garden of Earthly Delights) is something to look at:

[https://en.wikipedia.org/wiki/The_Garden_of_Earthly_Delights](https://en.wikipedia.org/wiki/The_Garden_of_Earthly_Delights)

<comment><USER3> I love this painting and have Celtic Frost to thank for introducing me to it and Bosch [0].

[0]: [https://en.wikipedia.org/wiki/Into_the_Pandemonium](https://en.wikipedia.org/wiki/Into_the_Pandemonium)</comment></comment>


Plastc is shutting down - <AUTHOR> Http://plastc.com <comment><USER2> I was really excited about this product! Sorry it didn't work out for you guys. As someone who went through a similar experience recently, I assure you that there is life after Plastc (but it won't happen over night, so give yourself some breathing room).

Thanks for working on this product for the past few years, and best of luck in whatever you do next!

</comment><comment><USER3> Current discussion: [https://news.ycombinator.com/item?id=14161221](https://news.ycombinator.com/item?id=14161221)

<comment><USER4> I think you meant to link here: [https://news.ycombinator.com/item?id=14159963](https://news.ycombinator.com/item?id=14159963)

<comment><USER3> Yes, thanks!

</comment></comment></comment><comment><USER5> Best wishes to the team during this stressful time.</comment>


Ask HN: Share your favourite bash/zsh aliases - <AUTHOR> I'll start by adding the most essential.
alias o="open"
alias x="exit"
alias g="git"
alias gs='git status'
alias gd='git diff'
alias g-='git checkout -'
alias serve='python -m SimpleHTTPServer 8000'
alias mem='top -l1 | grep PhysMem' <comment><USER4> A function, not an alias, but I've found it useful when working on deeply- nested projects/dirs:

        function up {
            if [[ "$#" < 1 ]] ; then
                cd ..
            else
                CDSTR=""
                for i in {1..$1} ; do
                    CDSTR="../$CDSTR"
                done
                cd $CDSTR
            fi
        }

I can just run "up" to "cd ..", or I can run "up 6" to "cd ../../../../../.."

</comment><comment><USER5>
      # Fast shortcuts
      alias c='clear'
      alias r='reset'
      alias q='exit'

      alias cd..="cd .." # I often make this mistake

      # Because sometimes you don't have the time to put this two letters
      alias ..='cd ..'
      alias ...='cd ../..'
      alias -- -="cd -"

      # Doing a fast proxy, good for watching netflix and youtube without restrictions
      alias proxy='ssh -C2qTnN -D 8080'

      # To search process with more details
      alias pp="ps axuf | pager"

      # Because I forget the name :(
      alias explore="ranger"

      # Because NeoVim is awesome :)
      alias vim=nvim

      # Do something and receive a desktop alert when it completes `sudo apt-get install something | alert`
      alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

      # Search process by name and highlight !
      function psgrep() { ps axuf | grep -v grep | grep "$@" -i --color=auto; }

      # Search for files and page it
      function search() { find . -iname "*$@*" | less; }

<comment><USER6> You can enable AUTOCD and never have to type CD again. :)

shopt -s autocd

</comment></comment><comment><USER7>
        # eXpand anything
        alias xx="atool -x"

( [http://www.nongnu.org/atool/](http://www.nongnu.org/atool/) )

The incredible amount of time this has saved over the years is great, but the real benefit never having remember either inspect archive files for the initial directory or remember to do this dance:

        % mkdir foo
        % cd foo
        % tar zxvf /path/to/bar.tar.gz  # or "unzip foo.zip" or "7x x foo.7z" etc
        % mv bar-1.2.3 ..
        % cd ..
        % rmdir foo

<comment><USER8> I have found this bash function a while ago. It doesn't save all the steps, but it shouldn't be too difficult to add them, too.

[https://gist.github.com/Fannon/41b0a6104435943cd826](https://gist.github.com/Fannon/41b0a6104435943cd826)

<comment><USER7> I used to use something similar, but atool is _far_ superior. It handles quite a few situations, but the most important is that it will decompress into the current directory (as a normal "tar zxvf foo.tar.gz" or "unzip foo.zip") if- and-only-if there was exactly one file or directory at the top level of the in the archive. If the archive was packaged badly, it will leave the resulting files in the temporary directory it creates. Also, atool leave the file(s) in the temporary directory in the event of a name collision, so you protected from the risk of clobbering existing files.

Without atool you have to either 1) create a temporary dir youself and do the dance I showed above, or 2) always inspect every archive before you decompress it to see if it has multiple top-level files, or 3) accept that typing "tar xvf" or similar will sometimes spam your current directory (often $HOME) with thousands of files.

Similar to how git tends to remove mental blocks around branching (you not longer have ot worry about the cost of making an arbitrary change), atool frees you from having to worry about how an archive was created. This has, in practice, saved _huge_ amount of time and mental effort.

</comment></comment></comment><comment><USER9> Here are a few I haven't seen in a lot of places but come in really handy.

First, alias this on Linux to get the 'open' command to work like OSX (e.g. 'open file.pdf'). It shadows a real 'open' command, but I have never used it, so no big loss :

      alias open='xdg-open'

The second one I use all the time. A process that is stuck on I/O (or other uninterruptible syscalls), or even a Python interpreter stuck in a C extension, won't always respond well to Ctrl-C. However, Ctrl-Z (suspend) and this alias (kills the last suspended process group) do work relatively well :

      alias killit='kill -9 %%'

This one I use a lot for copying the output of a command to the clipboard. Just run 'command | pbcopy' and then Ctrl-V elsewhere. pbcopy is actually an OSX command, I aliased it on Linux for ease of use :

      alias pbcopy='xclip -selection clipboard'
      alias pbpaste='xclip -selection clipboard -o'

This one runs a program under GDB. You can run e.g. 'gdbrun =python test.py' and debug C extensions more easily:

      alias gdbrun='gdb -ex=r --args'

</comment><comment><USER10> The essential and usual one handed listing aliases:

      alias l='ls -laFT'
      alias ll='ls -1aF'
      alias k='ls -laFTrt'
      alias kk='ls -1aFrt'

Some X + tee magic for logging.

      alias xlog='mv .xlog.txt .xlog.txt.old && startx -- -nolisten tcp 2>&1 | tee . xlog.txt > /dev/console'

      alias xdbg='mv .xdbg.txt .xdbg.txt.old && startx -- /usr/X11R6/bin/X -keepPriv 2>&1 | tee .xdbg.txt > /dev/console'

And in ~/.xinitrc run an oddly colored xterm with /dev/console output:

      xterm -C -fg '#b00020' -geometry 80x38+0+0 &

Most folks don't start X manually but when working on X itself, extra logging can often help.

</comment><comment><USER11> Install useful .bashrc shortcuts: u check updates, l detailed file list, .. parent dir, i [appname] install package, x [file] uncompress file, own [dir] get access to folder, p [procname] find process by name, f [string] find string in this folder's files, gg git commit and push

sed -i "$ a\\#custom shortcuts \nx(){ case \$1 in _.tar.bz2) tar xjf \$1;;_.tar.gz) tar xzf \$1;; _.bz2) bunzip2 \$1;;_.rar) rar x \$1;; _.gz) gunzip \$1;;_.tar) tar xf \$1;; _.tbz2) tar xjf \$1;;_.tgz) tar xzf \$1;; _.zip) unzip \$1;;_.Z) uncompress \$1;; esac; } \nf(){ grep -R -I \"\$1\" ./*; } \np(){ ps aux | grep \$1 | grep -v grep; } \nown(){ sudo chmod 777 -R \${1:-.} && sudo chown -R \${USER} \${1:-.}; } \nalias u='sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y' \nalias l='ls -la' \nalias ..='cd ..' \nalias i='sudo apt-get install -y ' \nalias gg='git add . && git commit -a -m "." && git push -u -f origin master'" ~/.bashrc && source ~/.bashrc

More here [https://github.com/gulakov/nodejs- starter/blob/master/README...](https://github.com/gulakov/nodejs- starter/blob/master/README.md)

</comment><comment><USER12> I use most of the oh-my-zsh builtins. The git ones save a ton of time and G='|grep' is brilliant.

        alias GD='git diff HEAD~1 HEAD'
        alias grv='git review'
        alias gunmod='git status | grep "modified" | awk "{print \$2}" | xargs -I{} git checkout -- {}'
        alias gv='gvim --remote-silent'
        alias json='| python -m json.tool'
        alias vg='vagrant'
        alias ans='ansible '
        alias ansp='ansible-playbook '
        alias vv='virtualenv venv'
        alias vvp='venv/bin/python'
        alias vvpi='venv/bin/python setup.py develop'
        alias yt='cd $HOME/downloads; youtube-dl --verbose'
        alias yt3='cd $HOME/downloads; youtube-dl --verbose --extract-audio --audio-format mp3 '

I keep all of my shell history, right now it think it goes back ~3 years, so every now and then I filter it by frequency and check if I am using a command often enough to justify an alias. Works quite well

<comment><USER13>
      > alias json='| python -m json.tool'

Is the beginning pipe intended? If I just run 'python -m json.tool' then it starts reading from stdin by itself (and works as intended). And with the pipe, I can't seem to make the alias work.

      $ echo  '{ "foo": 1234}' | json
      -bash: syntax error near unexpected token `|'

      $ json
      -bash: syntax error near unexpected token `|'

<comment><USER12> yeah, thats my bad, A recent addition and I must have copied too much of the command line when adding it.

</comment></comment></comment><comment><USER14> Assuming functions count:

        # git branch ahead/behind another
        function gahead() {
          # use first argument or master
          original=${1-master}

          # use the second argument or current branch if not given
          current=`git branch | grep \* | sed s/\*\ //`
          compare=${2-$current}

          # run git rev-list and capture numbers returned
          result=`git rev-list --left-right --count $original...$compare`

          # print numbers in a pretty message
          numbers=($result);
          echo -e "$Red-$Color_Off $compare is currently $IRed${numbers[0]}$Color_Off commits behind $original";
          echo -e "$Green+$Color_Off $compare is currently $IGreen${numbers[1]}$Color_Off commits ahead of $original";
        }

Edit: if it's not clear you would use this like:

        $ gahead #checks current branch against master
        $ gahead development #checks current branch against development
        $ gahead development foo #checks foo branch against development

NB: this is checking local branches, not remote branches.

</comment><comment><USER15> Starting a (generally GUI) application in the background and detaching it as much as possible from the current terminal, so it doesn't quit on a SIGHUP. I have this as a bash script (~/bin/bgrun), but it could pretty easily become an alias or function:

        #!/bin/bash
        nohup "$@" > /dev/null 2>&1 < /dev/null &

<comment><USER16> I have the same script, calling it nnohup in my ~/bin folder.

Common GUI programs I often launch from the command line I put an alias in my .bashrc for. e.g.

      alias thg="~/bin/nnohup /usr/bin/thg"
      alias rabbitvcs="~/bin/nnohup /usr/bin/rabbitvcs"
      alias meld="~/bin/nnohup /usr/bin/meld"
      alias xnview="~/bin/nnohup /usr/bin/xnview"
      alias dolphin="~/bin/nnohup /usr/bin/dolphin"
      alias vlc="~/bin/nnohup /usr/bin/vlc"

</comment></comment><comment><USER17>
      alias ..='cd ..'
      alias ...='cd ../..'
      alias ....='cd ../../..'
      alias .....='cd ../../../..'
      alias ......='cd ../../../../..'

      # search history (??) and processes (???)
      alias '?=fc -li 1'
      alias '??=fc -li 1 | grep '
      alias '???=ps-grep'

      alias m='less'

      alias su='sudo -H -s'

      # move to trash rather than deleting
      rm='trash-put -v'

      # simplify hard to remember command names
      alias pk-show='apt-cache show'
      alias pk-install='sudo apt-get install'
      alias pk-update='sudo apt-get update'
      alias pk-update-upgrade='sudo apt-get update && sudo apt-get upgrade'
      alias pk-uu=pk-update-upgrade
      alias pk-remove='sudo apt-get remove'
      alias pk-debinst='sudo dpkg -i'
      pk-search () {
        apt-cache search $1 | sort | egrep "${1}|$"
      }

</comment><comment><USER18> (Use ^d instead of aliasing x to exit)

Use magit in emacs as a git front-end instead of dozens of git aliases. You can continue to use vi or eclipse or whatever for editing. Use dired in emacs to replace a lot of file manipulation aliases.

Replace all your complicated aliases with ^r reverse search. For example, instead of typing

        sudo dnf --refresh check-update

I type

        ^rche

because 'check' is the most distinct string in that command in my mind, and by 'che' bash has already located the last time I typed it in the history. Save lots of history:

        HISTSIZE=100000                   # Lots of history.
        HISTFILESIZE=100000               # Lots of history in the file.
        HISTCONTROL=ignoreboth            # Ignore entries with leading white space and dupes.
        HISTIGNORE="ls:ll:cd:fg:j:jobs"   # Uninteresting commands to not record in history.
        shopt -s histappend               # Append history to file, don't overwrite.
        shopt -s histverify               # Show expanded history before running it.
        shopt -s cmdhist                  # Store multiline cmds as single

Which directory is hiding all the bytes?

        alias dux='du -x --max-depth=1 | sort -n'

Machines on the local network:

        alias nwho='ping -b -c 2 255.255.255.255 2>&1 | grep "bytes from" | cut -d " " -f 4 | sort | uniq | sed -e "s/://g"'

Set the permissions to allow sharing of files in a directory between users in the same group (probably doesn't work on bsd/osx):

        function rwxs {
            find $1 -type d | xargs chmod u+rwx,g+rwxs,o+rx
            find $1 -type f | xargs chmod ug+rw,o+r
        }

</comment><comment><USER19> I made a bash function for easier alias binding. It makes aliases immediately available and permanent. Also you don't need quotes so you can use tab completion etc. It goes like this:

ali <name of alias> <command>

to get it put this in your .bashrc

      function ali() {
       echo "alias $1='${@:2}'" >> ~/.bashrc   #in ubuntu use   ~/.bash_aliases
       echo "made alias:";
       echo "alias $1='${@:2}'";
       source ~/.bashrc;  #reload bashrc
      }

When I realize I type a command often, I just push the up arrow to get the command again, append "ali" infront of it and turn it to an alias. Works direclty.

And of course the alias to show the list of all aliases:

      alias alis='cat ~/.bash_aliases'

<comment><USER20> > alias alis='cat ~/.bash_aliases'

That only lists what's in .bash_aliases, along with any comments.

Why not just run _alias_ without arguments? It lists all active aliases, however and whenever they were defined.

      $ man bash
      /^SHELL BUILTIN COMMANDS
      ...
      alias [-p] [name[=value] ...]

"Alias with no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output."

</comment></comment><comment><USER21> I use a lot of oh-my-zsh's git aliases and a couple others but here are the ones I've used the most over time and some

alias _=sudo

alias aria='aria2c --file-allocation=none -c -x 10'

alias aria_list='aria2c --file-allocation=none --force-sequential=true -c -x 10 -i'

alias d='dirs -v | head -10'

alias hdmi='xrandr --output HDMI1 --auto --right-of LVDS1'

alias history='fc -l 1'

alias la='ls -lAh'

alias lock='i3lock -c #1E90FF'

alias ls='ls --color=tty'

alias md='mkdir -p'

alias pyfind='find . -name " _.py "'

alias pygrep='grep --include="_.py"'

alias rd=rmdir

alias reload_sound='pulseaudio -k && sudo alsa force-reload' # when sound messes up

alias settings=gnome-control-center

alias sl=ls

alias utorrent='utserver -settingspath /opt/utorrent-server-alpha-v3_3/ &'

alias vga='xrandr --output VGA1 --auto --right-of LVDS1'

alias vga_same='xrandr --output VGA1 --auto --same-as LVDS1'

</comment><comment><USER22> Simple Vagrant aliases:

      alias vup='vagrant up'
      alias vdn='vagrant halt'
      alias sv='ssh vagrant'

Some apt-get ones:

      alias sapu='sudo apt-get update'
      alias sapi='sudo apt-get install'
      alias sapr='sudo apt-get remove'

When I'm in Windows I use __Cygwin __(as a dropdown terminal[1]), these are useful:

      alias tk='taskkill -f -im'
      alias ping='PING'
      alias flush='ipconfig /flushdns'

[1]: [http://blog.elamperti.com/2014/11/dropdown-cygwin- terminal-i...](http://blog.elamperti.com/2014/11/dropdown-cygwin-terminal-in- windows-7/)

</comment><comment><USER23> Check out SCM Breeze [1] if you are interested in git aliases.

[1]: [https://github.com/ndbroadbent/scm_breeze](https://github.com/ndbroadbent/scm_breeze)

</comment><comment><USER13>
      alias sucs='sort | uniq -c | sort -n' # Makes a histogram of line-based input

      # Example
      $ echo c c c c b c b a a a | xargs -n1 | sucs
       2 b
       3 a
       5 c

</comment><comment><USER16> Quick mv -i and cp -i aliases:

      alias mvi="mv -i"
      alias cpi="cp -i"

Truncate a file to empty:

      alias zeroout="truncate -s 0"

</comment><comment><USER24> Have you taken a look at the top dotfiles on Github ( [https://dotfiles.github.io/](https://dotfiles.github.io/) )? They have a pretty good set of aliases, especially the basics and many for git.

For example, YADR is pretty good ( [https://github.com/skwp/dotfiles](https://github.com/skwp/dotfiles) ).

Of the ones not listed already in this thread, a few standards that are great to have:

L - <USER2>

H - | head

T - | tail

G - | grep

C - | wc -l

N - /dev/null

S - | sort

_ - <USER3>

<comment><USER25> the dotfiles site seems a good idea but for some reason I'm basically unable to read the text. Even highlighting some with the mouse doesn't help.

</comment></comment><comment><USER26> #make intermediate directories and touch a file all at once

#e.g. mktouch ~/Desktop/test/file.md would make the test dir if it didn't exist then touch file.md inside of it

mktouch() {

        if [ $# -lt 1 ]; then
            echo "Missing argument";
            return 1;
        fi

        for f in "$@"; do
            mkdir -p -- "$(dirname -- "$f")"
            touch -- "$f"
        done
    }

</comment><comment><USER27> This is my favorite because it is so pleasing:

alias ffs=sudo

example usage:

      $ grep 'something' some.conf
      grep: some.conf: Permission denied
      $ ffs !!
      Password:`

<comment><USER28> I'm using please alias. You don't need even use !!. alias pls='sudo `fc -n -l -1`'

</comment></comment><comment><USER29> If you're a virtualenv user, I use this one-liner to start load a virtualenv named after the current directory:

        alias v='workon "${PWD##*/}"'

Also, I really like the -p flag of mkdir (creating child directories as needed, without failing if one doesn't exist)

        alias mkdir='mkdir -p'
        # i.e. mkdir ./a/b/c/

</comment><comment><USER30> I don't have many. Tab completion on linux is usually enough.

        alias i='i3-msg -q exec --'
        alias jql='jq . -C | less -R'

Also bindings:

        bind -m vi-command -x '"\C-n": new-term-here'
        bind -m vi-insert  -x '"\C-n": new-term-here'

        #which is `i gnome-terminal --working-directory="$PWD"`

</comment><comment><USER31> My most used aliases would probably have to be for the git commands. Each git command, I have aliased to the name of the command, preceded with the letter 'g'. So:

      alias gadd='git add'

and so on.

I find the oh-my-zsh git plugin's default aliases to be unintuitive and hard to remember. Simply not having to type 'git ' before everything is good enough for me.

</comment><comment><USER32>
        alias c='noglob perl -e '\''shift; $x = eval qq(@ARGV); print $x; printf " 0x%x 0%o %b\n", $x, $x, $x'\'' _' ' "'

Quick and easy perl calculator, with octal, decimal and hex output. Example usage:

        root:~$ c 365 * 24 * 6 / (14 +2)
        3285 0xcd5 06325 110011010101

</comment><comment><USER33> On Mac OS, copy the CWD to the clipboard:

alias cpcd="echo -ne \$(pwd) | pbcopy"

Useful when you have a file picker in front of you, but you know you have a terminal already in the directory you want. Switch to the term, cpcd, switch to the file picker, Go to folder (⌘-Shift-G), Paste (⌘-V).

when you have a terminal open in a directory, but another app has a file picker box.

<comment><USER24> Why not just do 'open .' in Terminal/iTerm 2?

</comment></comment><comment><USER34> Pretty git log:

        alias gl="git log -n 15 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Copy current working dir (OSX), very handy.

        alias cpwd='pwd | pbcopy'

</comment><comment><USER35> I love some of the aliases here. :D Added them to my toolbelt. Here are mine.

[https://github.com/uberspot/dotfiles/blob/master/.alias](https://github.com/uberspot/dotfiles/blob/master/.alias)

</comment><comment><USER36> By far my favourite is

        alias sl ls

[https://github.com/andreastt/dotfiles/blob/master/login#L44](https://github.com/andreastt/dotfiles/blob/master/login#L44)

<comment><USER18>
        sudo dnf install sl

</comment></comment><comment><USER37>
      l() { tree -L 1 -CDFha --du --dirsfirst $@; }
      ll() { l -L 2 $@; }
      lll() { l -L 3 $@; }
      md() { open -F -a /Applications/Marked\ 2.app/ $@; }
      st() { open -F -a /Applications/Sublime\ Text\ 2.app/ $@; }

</comment><comment><USER38>
        # quick sketching
        alias ep='emacs -eval "(picture-mode)"'

        # quick timer
        alias timer="time read -sn1"

        # quick look
        alias ql='qlmanage -p 2>/dev/null'

</comment><comment><USER39>
        alias lc="ls -C | less"

        alias ll="ls -lh"

        function mkd() {
            if [[ $#  == 0 ]] ; then
                return
            fi

            mkdir "$1"
            cd "$1"
        }

</comment><comment><USER40> # trim off trailing spaces

        alias rstrip='sed -i "s/[ \t]*$//"'

# delete .pyc files

       alias delpyc='find . -type f -name "*.pyc" -delete'

</comment><comment><USER41>
      alias ga="git add ."

      alias gs="git stash"

      alias gas="ga && gs"

      alias gmm="git merge master"

      alias grm="git rebase master"

</comment><comment><USER42> Quickly get my ip:

        alias myip="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | cut -d\   -f2"

<comment><USER43> I frequently have my machines connected via multiple interfaces. I put together a little simple C program that can be run as a script.

[https://github.com/colindean/getip](https://github.com/colindean/getip)

I've not actually used it as a script in a while, and it appears to be broken in that regard at the moment (something about ld not being able to write to the tmp directory). However, its Makefile is still operational. Maybe someone will see this and submit a PR that fixes it?

</comment></comment><comment><USER44> alias scp='rsync --archive --compress-level=3 --copy-links --partial --inplace --progress --rsh=ssh -r'

<comment><USER14> But now you can't use scp, right? Or did you alias that too?

<comment><USER45> Just prepend the command with `\\`, that disables aliases.

</comment></comment></comment><comment><USER46> My best time-savers:

alias ff="find . -iname"

alias size="du -h --max-depth=1"

alias latest="ls -lt |head"

alias orly='sudo $(history -p \\!\\!)'

</comment><comment><USER47> Use .ssh/config to shorten all hostnames a set specific key combinations.

        ssh h.e.c

</comment><comment><USER20>
      alias l='ls -1F'

</comment><comment><USER8> alias ip="curl icanhazip.com" # Your public IP address

alias diskspace="du -S | sort -n -r |less"

alias pyserver='python -m SimpleHTTPServer'

alias phpserver='php -S localhost:8000'

alias phplog='tail -f /var/log/apache2/error.log'

</comment><comment><USER48>
      alias hn='elinks http://news.ycombinator.com/news'

</comment><comment><USER49> alias todo='grep "FIXME" * ; grep "TODO" * ; grep "XXX" *'

Shows up all the things I still need to work on in a given project (assuming of course that you annotate your code...).

</comment><comment><USER50> I use oh-my-zsh aliases

        ...=../..
    	....=../../..
    	.....=../../../..
    	......=../../../../..
    	1='cd -'
    	2='cd -2'
    	3='cd -3'
    	4='cd -4'
    	5='cd -5'
    	6='cd -6'
    	7='cd -7'
    	8='cd -8'
    	9='cd -9'
    	_=sudo
    	afind='ack-grep -il'
    	d='dirs -v | head -10'
    	g=git
    	ga='git add'
    	gaa='git add --all'
    	gap='git add --patch'
    	gb='git branch'
    	gba='git branch -a'
    	gbr='git branch --remote'
    	gc='git commit -v'
    	'gc!'='git commit -v --amend'
    	gca='git commit -v -a'
    	'gca!'='git commit -v -a --amend'
    	gcl='git config --list'
    	gclean='git reset --hard && git clean -dfx'
    	gcm='git checkout master'
    	gcmsg='git commit -m'
    	gco='git checkout'
    	gcount='git shortlog -sn'
    	gcp='git cherry-pick'
    	gcs='git commit -S'
    	gd='git diff'
    	gdc='git diff --cached'
    	gdt='git difftool'
    	gg='git gui citool'
    	gga='git gui citool --amend'
    	ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
    	ggpull='git pull origin $(current_branch)'
    	ggpur='git pull --rebase origin $(current_branch)'
    	ggpush='git push origin $(current_branch)'
    	gignore='git update-index --assume-unchanged'
    	gignored='git ls-files -v | grep "^[[:lower:]]"'
    	git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
    	gk='gitk --all --branches'
    	gl='git pull'
    	glg='git log --stat --max-count=10'
    	glgg='git log --graph --max-count=10'
    	glgga='git log --graph --decorate --all'
    	glo='git log --oneline --decorate --color'
    	globurl='noglob urlglobber '
    	glog='git log --oneline --decorate --color --graph'
    	glp=_git_log_prettily
    	gm='git merge'
    	gmt='git mergetool --no-prompt'
    	gp='git push'
    	gpoat='git push origin --all && git push origin --tags'
    	gr='git remote'
    	grba='git rebase --abort'
    	grbc='git rebase --continue'
    	grbi='git rebase -i'
    	grep='grep  --color=auto --exclude-dir={.bzr,.cvs,.git,.hg,.svn}'
    	grh='git reset HEAD'
    	grhh='git reset HEAD --hard'
    	grmv='git remote rename'
    	grrm='git remote remove'
    	grset='git remote set-url'
    	grt='cd $(git rev-parse --show-toplevel || echo ".")'
    	grup='git remote update'
    	grv='git remote -v'
    	gsd='git svn dcommit'
    	gsps='git show --pretty=short --show-signature'
    	gsr='git svn rebase'
    	gss='git status -s'
    	gst='git status'
    	gsta='git stash'
    	gstd='git stash drop'
    	gstp='git stash pop'
    	gsts='git stash show --text'
    	gts='git tag -s'
    	gunignore='git update-index --no-assume-unchanged'
    	gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
    	gup='git pull --rebase'
    	gvt='git verify-tag'
    	gwc='git whatchanged -p --abbrev-commit --pretty=medium'
    	gwip='git add -A; git ls-files --deleted -z | xargs -r0 git rm; git commit -m "--wip--"'
    	history='fc -l 1'
    	l='ls -lah'
    	la='ls -lAh'
    	ll='ls -lh'
    	ls='ls -G'
    	lsa='ls -lah'
    	md='mkdir -p'
    	please=sudo
    	po=popd
    	pu=pushd
    	rd=rmdir
    	run-help=man
    	which-command=whence

<comment><USER51> Do these really save that much time?

I stopped using oh-my-zsh because of these. There is a popular program called 'gap' which got over-written by one of these aliases.

<comment><USER52> I am hooked on most of them at this point, but I can see that being very annoying.

</comment></comment></comment><comment><USER53> alias cp='cp -i'

prompts when you overwrite something using cp ("oops, wrong folder")

alias rm='rm -I'

prompts when you delete more than three files ("oops, a space too much in rm ./ *")

</comment><comment><USER54>
      alias nope="git commit -m 'ಠ_ಠ'"

</comment><comment><USER55> chsh -s /bin/fish

[https://github.com/fish-shell/fish-shell](https://github.com/fish-shell/fish- shell)

</comment><comment><AUTHOR> Create and cd into mkcd() { mkdir $@ && cd $_ }

</comment><comment><USER56> My favorite one is: alias fuck='pkill -9'

</comment><comment><USER57> alias e='emacsclient'

alias serv="ssh firstname.lastname@example.com"

alias work="cd /Users/myname/Sources/mycompany/myproject"

</comment><comment><USER58> alias ":q"="exit"

</comment><comment><USER59>
        alias ..='cd ..'

</comment><comment><USER60>
      alias dc=docker-compose

</comment><comment><USER61> alias s=ssh

</comment><comment><USER62> has always served me well - `alias yolo='git rm -f * && git commit -am "yolo" && git push -f origin master'`</comment>


Household debt is holding back the US economy - <AUTHOR> http://cs702.wordpress.com/2011/11/18/household-debt-is-holding-back-the-u-s-economy/

<comment><USER2> Yeah, you can't spend money you don't have forever.

<comment><USER3> The Fed keeping interests rates as low as they have punishes savers. Can't put all the blame on households for that.

<comment><AUTHOR> The Fed wants savers to invest in riskier things -- new businesses, new projects, expansions, etc. -- so it has pushed rates on safe investments like treasuries to zero (three-month US treasuries pay 0.01% right now). The idea is that this will provide an incentive for savers to invest in things that will produce economic growth.

Yet despite the Fed's success at pushing rates down to zero, savers _still_ want to invest predominantly in assets perceived to be safe (like treasuries and FDIC-insured bank accounts).

When consumers are strapped under the yoke of debt and can't buy more stuff on credit, no government effort to get businesses to invest more can work...</comment></comment></comment>


Show HN: A note-taking web app that won't ever betray you - <AUTHOR> https://noteto.me/ <comment><USER3> This assumes that edsu will never betray you.

Given the broad meaning of betray used, that seems unlikely. If edsu gets big it will have to pay for all that storage somehow. Like all things edsu will one day come to an end, and like most websites/companies/endeavors it will probably come to an end before I do.

<comment><USER4> Edsu seems to rely on federated services.

Email, similarly, unfortunately fell to convenience - GMail, with Google selling your data.

The parent brings up a good point, how do we know Edsu won't betray its users? Or that it won't become dominated by a centralized provider?

I'd love to hear an answer.

For me, our team decided to take a route that _cannot_ be compromised - <USER2> identity belongs to you, fully decentralized ([https://gun.eco/docs/Todo- Dapp](https://gun.eco/docs/Todo-Dapp)), yet can do 0-server password resets and other conveniences.

<comment><USER5> I know I'm a bit of a broken record, but a <noscript> notice that JS is required is always appreciated rather than a blank page.

<comment><USER4> Apologies, yeah, the site has an interactive coding tutorial that teaches you to write and run your JS. <noscript> would be good - make a PR? [https://github.com/gundb/gun- site/blob/master/docs/src/index...](https://github.com/gundb/gun- site/blob/master/docs/src/index.html)

</comment></comment></comment></comment><comment><USER6> This is my first time reading about Edsu, it seems very similar to the Solid Platform in one important aspect: it keeps data in the control of the user, separate from applications.

I like how low-level and simplified the protocol is, being limited to only 9 types of messages. Compared to Solid which carries baggage from RDF, this seems far easier for third parties to implement.

The note-taking app is really under-selling the protocol beneath it. What could help sell it better is by doing something better than a centralized platform can.

<comment><AUTHOR> Thanks! One of the goals of Edsu is that it's simple enough that you can "telnet" in and just talk directly to the server like you can with HTTP or SMTP. It can seem like a trivial feature, but I've found that being able to speak a subset of a protocol from any language after just an hour or two of duct-tape hacking ends up being a big unsung feature.

And itgoon has it right - this was the most useful thing I could think to write that only took a single day (I had an self-imposed deadline to hit earlier this week).

Here's a discussion of more interested projects and how Edsu could be used in each (and its advantages and disadvantages):

[https://edsu.org/use-cases/](https://edsu.org/use-cases/)

<comment><USER7> Edsu seems to have some similarities to [https://remotestorage.io](https://remotestorage.io) . Can someone summarize the main differences?

<comment><AUTHOR> From a quick look through remoteStorage, it looks to me like it's is focused on storage (and so appropriately named!), while Edsu is more explicitly a foundation for applications.

One place this shows up is that Edsu has a permissions model where other people can read and interact with what you've stored (within very tightly defined parameters), which is the basis for writing multi-user apps like, say, a distributed Reddit or Slack.

They both have the same model regarding the ownership of data though. The biggest difference there is that Edsu uses a Merkle tree as the storage, like IPFS and git, which has a lot of consequences in terms of how it gets used.

</comment></comment></comment></comment><comment><USER8> yey another note taking app... The digital equivalent of making ashtrays in pottery class.

<comment><USER9> I thought that was Todo lists? The hello world equivalent of web apps.

<comment><USER10> The technology improved a bit.

</comment></comment></comment><comment><USER11> "Write some text - it'll be here when you get back.... I can promise all this because NoteToMe is an Edsu app. It means I don't have to store your data, you do ...."

The same is true of the text file I've been adding to for decades. After learning the hard way (several times) NEVER to trust someone else's prog/assume they'll be around for more than 6 months. Multiple backups sync'd religiously.

And ... _no_ website needed! Not even a net connection! Just a 'personal computer'!

"You do have to sign up for an Edsu account...."

Whoops ... there it is.

</comment><comment><USER12> Hi, edsu seems very interesting. I've looked through examples and read docs. Question: is it possible to make an app and allow user to set permissions. E.g. lets say I have writing app. I want initially to create writings as `private` and then promote them to `public`.

I don't see if it's possible. I see that scope is fixed for now in the name like that `prv.app.edsu-org.hello-world.storage`. So I assume `token` only works for `prv.app.edsu-org.hello-world.storage` but wouldn't work for `pub.app.edsu-org.hello-world.storage` or would it?

<comment><AUTHOR> Thanks for reading!

If an app wanted to be able to switch something from public to private or back, it'd get a token with write permissions for _two_ names, one with the prv.* prefix, and one with the pub.* prefix. And that's a good thing: it makes it clear to the user that the app is requesting the ability to make the things that they write public.

It's still just one grant request, it's just that there'd be two line items instead of one. Also, names are simple pointers to blocks of data, so, for instance, if both names happen to be pointing to the same written piece, there's no duplication of data.

<comment><USER12> And another question. It's not possible to list all the keys under some namespace, right? `prv.app.edsu-org.prefernces-app.preferences` - I can't see what are the subkeys?

And I see that there is no multi-get request. So how would you implement your notes app if you have multiple notes, not one. Would you have a document which would store hashes of all notes and then fetch in parallel all of them (making n calls, 1 call per note)?

<comment><AUTHOR> Names are big chunky things - you want to use them as sparingly as possible, and in general they should be "well known" \- meaning a list function (which does exist as pub.srv.edsu.listings.names, though it's currently not something you can request permissions to) goes pretty hard against the grain of the protocol.

Essentially, you'd only want more than one name if there's different visibility requirements for different parts of your data, or you specifically want to disconnect the state of some of data from others. All of your structure (e.g. lists, trees, lookup tables, etc.) you want to keep in the blocks.

So in your case of having multiple notes, you'd likely want the name _block_ to keep track of the block hash of each one (so, yes, exactly as you say). And correct, if you wanted all of them you'd need to do N block-get calls. However, due to pipelining and chaining, that's not as costly as it might sound: in terms of latency it should be costless, and in terms of bandwidth the overhead is a fraction of a percent if you're using full blocks (i.e. what you'd be doing if you're concerned about bandwidth).

A lot of this stuff is quite low level (think almost SCSI kind of low level) - it's meant to be abstracted away by libraries like basic-storage.js. In that case, having multiple notes is trivial - you put each note under a different storage key, and the library sorts out how to retrieve them efficiently and update them independently, even though they're all be under the same name.

In case you haven't run into it yet, I talk a little bit more about why names are meant to be used sparingly at [https://edsu.org/use- cases/storage/](https://edsu.org/use-cases/storage/)

</comment></comment></comment></comment><comment><USER13> I like the concept of decoupling storage from the editor app. I wish more SAAS providers recognized this as an important product feature. It would allow deployment of hosted services in much wider range of scenarios, where privacy and data ownership is a big concern.

</comment><comment><USER14> It's not really clear to me how the data is stored. Is it confined to the Edsu server I use akin to Diaspora and applications connect to it? How do I migrate my data or switch providers? Is it lost if the server or my localStorage goes down?

<comment><AUTHOR> Thanks for your interest!

It is indeed stored on an Edsu server. The data format is trivial and completely specified, so switching providers should be straightforward (an Edsu app to do the data transfer would be easy to write, and I plan on writing one). If you're using your own domain (which is encouraged), from there you'd just update an A record to complete the transition, if not, you'd set up a transparent redirect on your old host to keep all your old links/permissions alive.

It's pretty old school in that if your provider loses a server and they're _not_ doing replication/backups then there can be data loss. If they are, then a failover should work fine, with minimal loss and no corruption (the important stuff is atomic).

With localStorage, how it's used is up to the app (generally it'd only be used for keeping a token and maybe a block cache), so I wouldn't expect a loss of that to matter in most cases.

<comment><USER14> Thanks for the helpful reply! I brought up local storage because people were talking about some kind of sync and it sounded like the browser's storage would be used

</comment></comment></comment><comment><USER15> I actually found that using special directory for notes and git and grep is actually convenient. The only thing I'm missing is fuzzy search features of grep, like build on word2vec models.

<comment><USER16> Can we call this the Dropbox syndrome where people boasts they have a better solution with combination of cli tools instead of a service?

<comment><USER17> That is an interesting _Hacker News_ type of phenomenon, but I personally enjoy reading the alternative solutions to a presented problem.

And sometimes it turns out that the SASS product is simply a wrapper around a cli tool... for example the product [1] _Mole_ , which is a wrapper around ssh to make it easier... but not really necessary...

[1] [https://news.ycombinator.com/item?id=18236125](https://news.ycombinator.com/item?id=18236125)

</comment></comment></comment><comment><USER18> It's interesting, a few months ago I asked HN about how websites can let users maintain control of their own data, and I never heard of Edsu. This looks pretty good!

<comment><USER19> It launched a few days ago AFAICT.

</comment></comment><comment><USER20> I don't get this, is the data stored client-side or server-side?

If it's client-side, why would I need a service provider: [https://edclave.com/sign-up/](https://edclave.com/sign-up/)

<comment><AUTHOR> It's stored on the server.

</comment></comment><comment><USER21> Doesn't save for me. After signing up and getting edclave address, signing in an granting access, changing the text and reloading doesn't save. Nor does changing and navigating away and back - always get the "erase me.." text.

iOS safari

<comment><AUTHOR> Sorry about that, and thanks for the bug report! I haven't been able to test with an iOS device yet - I'll get on that.

</comment></comment><comment><USER22> Have you heard of Scuttlebutt? [https://www.scuttlebutt.nz/](https://www.scuttlebutt.nz/) How does EDSU compare?

<comment><AUTHOR> Similar in that you get to keep your own data.

Different in that it's lower level - it's not a social networking protocol - it's something you can build a social networking protocol _on_.

</comment></comment><comment><USER23> Oh the irony. I clicked through to edsu.org to learn more about the backend of this note taking app, and the error I got was:

"Safari cannot open the connection because the network connection was lost."

</comment><comment><USER24> I think edsu could be nice for "serverless" apps, eg static web apps. Should make it work offline. And edsu should keep a copy of the data on the client. Then sync once the client is online.

<comment><AUTHOR> Edsu's data store is content-addressed - i.e. everything is hashed and immutable from a storage perspective.

A great thing about this is it makes a lot of caching problems simply go away. So while there's no explicit support for local caches disconnecting and then re-connecting later, the underlying protocol gives any library wanting to implement this feature a lot of support for it.

</comment></comment><comment><USER25> A frozen banana that won't make you sick and kill you!

</comment><comment><USER26> if this used gun.js, you wouldn't even need a third party provider.

(not affiliated with the gun.js team, just think it's a powerful P2P platform).

</comment><comment><USER27> how goes it compare to Standard notes

</comment><comment><USER28> doesnt work with private browsing...

<comment><USER29> like chrome incognito? i tried and it does

</comment></comment><comment><USER30> Evernote</comment>


How I got better at customer interview management - <AUTHOR> http://purde.net/2018/02/customer-development-pipedrive/ <comment><USER2> Great work, we can help you find tech collaborators on collaborizm.com, I'm the cto.

<comment><USER3> It's fine to reference your own work on HN if it's relevant and part of a good conversation, but it's not fine to post promotional comments to HN. The criteria for being on the right side of that line are: 1) is there interesting relevant info and 2) has the commenter been posting these repeatedly.

By those criteria your comment is on the wrong side of the line. It's not in your interest to post like this to HN because to many users it feel spammy.

<comment><USER4> It's sort of related, see PS3 in the article.

<comment><USER3> Perhaps, but there isn't enough information in the comment to make it over the line.</comment></comment></comment></comment>


The new Google Maps - <AUTHOR> https://maps.google.com/help/maps/helloworld/desktop/preview/

<comment><AUTHOR> Looks like this went out a bit early. The video is now down and the signup form 404s. No doubt we'll get more details tomorrow.</comment>


Sony Confirms PlayStation Network Outage Caused By 'External Intrusion' - <AUTHOR> http://techcrunch.com/2011/04/23/hack-attack-sony-confirms-playstation-network-outage-caused-by-external-intrusion/ <comment><USER2> I feel that there is something in the ps3 scene that might have triggered this, that nobody is actually mentioning.

Recently a custom firmware (rebug) was released that allowed PS3's with hacked firmware to connect to the developer only version of the PSN used for testing and development.

Even more so, they have figured out how to trick the dev PSN to allow them to 'buy' PSN games. They also figured out how to break out of the sandbox with certain games like the call of duty series, to allow patched games to play with regular players.

I personally suspect that this is the intrusion that they are referring to, and they are busy retooling the network to stop this from being possible.

</comment><comment><USER3> Two days.. wow. We may have reached the tipping point where the threat of black hat retaliation can influence even the most powerful corporations.

It's a shame it's come to that, but it's the predictable result of a legal system that has utterly failed a large segment of the public. Corporations write laws and use the civil courts as a weapon. Nobody can even afford to defend themselves. For those who can't live with the injustice, there aren't many options.

<comment><USER4> Why would it be a shame? It's not pretty, agreed, but this might induce corporations to start behaving less "evil", otherwise there is always the threat that the hordes with their (digital) pitchforks will storm the castle. It tilts the balance of power in the right way.

<comment><USER5> You've misinterpreted the target of shame. It's a shame that we, the public, have no accessible, legitimate recourse against a corporation the size of Sony. It is _not_ a shame that Sony is receiving a kidney punch.

<comment><USER4> Indeed. Hopefully this kind of struggles will eventually result in accessible, legitimate recourses. However, those hardly ever come into existence out of thin air.

Given that one party overpowers another, the former will attempt to grab more and more power. With an international entity such as corporations this is even more true, as even governments are having increasing trouble controlling them.

Diplomacy-based recourses are usually a result of a balance between the power of groups. For example, in the industrial revolution the workers unionized to have more marketing power against their employers. It has some interesting parallels (but also wild differences) with this.

</comment></comment></comment></comment><comment><USER6> Color me not surprised. My email address had been registered on PSN and I got emailed regularly about the activity of this account. My email is very unique so they no doubt registered in an automated method with a database of farmed email addresses. I cut a ticket to Sony and had the account closed. A buddy of mine recently bought a PS3 and was unable to register with any of his email addresses as they all already had been registered to other accounts! What the hell is going on at Sony?

</comment><comment><USER7> I'm really tired of this. I don't care about anybody's arguments -- regardless of the side -- I just want to be able to play my PS3 in peace.

<comment><USER8> serious question (I don't own a PS3 (or an XBOX)) - is it not still playable offline, or is it like these new drm infested games I keep hearing about that require you to be online even for single player games?

<comment><USER9> I mostly use my ps3 as a Netflix machine now-a-days (new baby) and have been very frustrated with the PSN downtime since Netflix won't let you login to their service unless you are logged into PSN (for some reason). To me that means my TV has seen very little use and I get to watch shows on my 13" mac. :(

Overall I am very disappointed in having the PSN be so key to the ps3 experience while the PSN, to me, is pretty worthless and poor even when it is working.

<comment><USER10> i'm able to still use netflix after getting 2 login failures on my end... it's a hassle but it's not blocking me from using it entirely.

<comment><USER11> Yeah, just keep retrying the login. Once you see the 'cover' images of the netflix titles you can cancel the login screen and use netflix with no problems.

</comment></comment></comment></comment></comment><comment><USER12> Sounds a bit silly but could Sony be hosting some of the elements of the PSN on EC2 and this is just a PR story to pass the buck... the dates seem a little too similar to me..

<comment><USER13> A PR story? Those are usually meant to give _good_ PR, not make your platform look insecure and unstable. I don't see how it would be in Sony's interests to pretend the widely publicized Amazon outage had nothing to to with its problems and instead make up a story about how its security had been breached.

<comment><USER12> We may see it differently, from my point of view its much easier for Sony to blame this on anon as a) there is a known conflict already and its very simple to point the finger b) it hides the fact that a critical part of there system is on a 3rd party service with no contingency plan / backups..

I haven't read anywhere about security breached all I've seen is DDOS and thats exactly what anon are known for.

</comment></comment></comment><comment><USER14> So Sony starts a war with hackers, we'll see how this plays out. Maybe I'll go get some popcorn.</comment>


Synchronous line-by-line file reader for Node.js - <AUTHOR> https://github.com/nacholibre/node-readlines

<comment><AUTHOR> Reading file line by line may seem like a trivial problem, but in node, there is no straightforward way to do it. There are a lot of libraries using Transform Streams to achieve it, but it seems like a overkill, so I've wrote simple version using only the filesystem module of node.</comment>


How to Stop a Robot Revolution in Five Easy Steps - <AUTHOR> https://artplusmarketing.com/how-to-stop-a-robot-revolution-in-five-easy-steps-94e90f52bab9 <comment><AUTHOR> on another note.. no, I don't fear 'paperclip maximisers'. The issue assumes a robot design that makes no sense. A paperclip maker will not get 'general AI' and full mobility. It'll be stuck on a production line.</comment>


Mesenchymal Stem Cell Treatment for Ischemic Kidney Disease (2013) - <AUTHOR> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3795813/ <comment><AUTHOR> (Note: this is just a "Concise Review" article. Missed the header due to the character limit...)</comment>


CS major vs CE major - <AUTHOR>

I'm starting college next year and am debating between majoring in Computer Science or Computer Engineering. I've seen a lot of posts regarding CS programs and their follies (I believe my university is a "Java school") and am wary of a purely software oriented major. On the other hand, I haven't heard much talk about Computer Engineering programs.
I am interested in both programming and electronics and want to learn more about CS, but at the same time I don't want to limit myself to a strictly "8 hours in front of the computer" type of job.
A CE degree seems to integrate both CS and EE, and encompass more of what I want to study, so I would like to hear the suggestions and opinions of the YC populous on both CS and CE degrees. <comment><USER2> I did a CE degree (Computer Systems Engineering) at Stanford. To be honest, I should have listened to my CS advisor, who said CE really doesn't give you enough depth in either CS or EE. Four years pass fast, and invariably a CE degree is the "no theory" or "less theory" degree. This will hurt you in the long run if you end up choosing CS or EE as your eventual interest. Lacking a strong algorithms / theory background, it can hurt both when interviewing (most great programming shops place a heavy emphasis on running times and algorithms) and when actually developing code. On the EE side, you pretty much need a PhD or at least a MS to get one of the more interesting R&D positions. And for applying to grad school, you'll be up to your more solidly EE brethren who have that much more coverage of the material and connection with EE faculty.

My suggestion: try some of both, and make a decision, and go deep.

If your college really is a 'java school' -- consider doing well your freshman year and transferring to a school known for solid CS instruction. It'll probably make a difference.

Good luck!

<comment><AUTHOR> Thanks, this helps a lot, I'm leaning towards CS. Does anybody else have any advice?

</comment></comment><comment><USER3> I am about to complete my CE degree. I chose the program because 1. my school has a weak CS program (which is part of the business dept.) and 2. I was already familiar with programming out of high school, so I wanted to get some hardware experience. I have found CE to be a nice middle ground between CS and EE, with an emphasis on engineering principles that you probably wouldn't find in a CS program. I also learned a lot more math than I would have otherwise. If you find your CE program lacking in theory, you can always take a few elective courses.

As a Bachelors degree, I think CE is a great compromise between CS and EE. I don't believe you would have any trouble pursuing a graduate degree in CS or EE, given that choice.</comment>


Trump Eyes a New Real-Estate Purchase: Greenland - <AUTHOR> https://www.wsj.com/articles/trump-eyes-a-new-real-estate-purchase-greenland-11565904223?mod=rsswn <comment><USER2> Previous US attempts to buy Greenland:

\- President Harry Truman developed a geopolitical interest in Greenland and in 1946 offered to buy Greenland from Denmark for $100 million. But Denmark refused to sell.

\- The State Department launched an inquiry into buying Greenland and Iceland in 1868. Here's a link to the published report - [https://books.google.com/books?id=U9lIAAAAMAAJ&pg=PP13#v=one...](https://books.google.com/books?id=U9lIAAAAMAAJ&pg=PP13#v=onepage&q&f=false)

<comment><USER3> There was an interesting thread on Reddit about the 1868 inquiry:

[https://www.reddit.com/r/AskHistorians/comments/cd3jul/why_d...](https://www.reddit.com/r/AskHistorians/comments/cd3jul/why_did_the_us_purchase_of_iceland_and_greenland/)

</comment></comment><comment><USER4> [https://en.wikipedia.org/wiki/Greenlandic_independence#Moves...](https://en.wikipedia.org/wiki/Greenlandic_independence#Moves_towards_independence):

 _"As part of the self-rule law of 2009 (section §21), Greenland can declare full independence if they wish to pursue it, but it would have to be approved by a referendum among the Greenlandic people. A poll in 2016 showed that there was a clear majority (64%) for full independence among the Greenlandic people, but a poll in 2017 showed that there was a clear opposition (78%) if it meant a fall in living standards."_

⇒ Why try to buy it? Offer them to become a US state and invest there if they vote to become independent, and see whether they bite.

<comment><USER5> A new state comes with new federal representatives and senators. With control of congress balancing on a knife's edge, that makes statehood a huge political football. One side or another will see an advantage in it, and the other side will oppose it in force ... regardless of any other potential benefits.

</comment></comment><comment><USER6> See also: HN discussion on gwern's _" Why Didn't Denmark Sell Greenland?"_ : [https://news.ycombinator.com/item?id=20366039](https://news.ycombinator.com/item?id=20366039)

</comment><comment><USER7> Sure for 100 billion-1 trillian dollars. It's at least worth as much as a large startup. They should also drive up the price by letting other countries like China and Russia bid on it.

It probably also has a bunch of resources on it, that will be accessible once it melts. They should rename it Trumpland if the purchase happens.

<comment><USER8> For a price that low, Google should buy it. Finally a use for that cash mountain.

<comment><USER7> Googlestan has a nice ring to it. Just buys its own country off the coast and declares independence.

</comment></comment></comment><comment><USER9> I set my Facebook marketplace location as Nuuk Godthab to stop it alerting me about junk that I didn't want.

</comment><comment><USER10> That'll be some nice beachfront property in 100 years at the rate we are emitting CO2.

</comment><comment><USER11> I think it's actually a really good idea. Strategically at least, it's possible that it could be done, but I think it would first need the approval of everyone living there.

</comment><comment><USER12> I bet the reason Trump wants Greenland is for more claims to Arctic oil

</comment><comment><USER13> Is this Trump's Sudetenland?</comment>


Ask HN: Balancing flow with the needs of the healthy human body - <AUTHOR> Hello everyone, Recently I've been considering the impacts of flow on the human body. Of course most of us as hacker news readers have heard the idiom "It takes about 15 minutes for a person to get into a state of flow" and any of us who have experienced understand the pleasure that it is to be there and the productivity gains it produces in us as engineers, writers, artists, athletes, and a variety of other professions, hobbies, and activities.<p>The question I pose is for those activities which while flow inducing also are generally performed in a relatively inactive position such as sitting. How do we balance the humans need for the eyes to focus on objects in the distance, the human bodies need to stand and stretch, and look away from the screen at least every now and again with the flow state? <comment><USER2> I would say look at

[http://www.amazon.com/The-Power-Full-Engagement- Performance/...](http://www.amazon.com/The-Power-Full-Engagement- Performance/dp/0743226755)

</comment><comment><AUTHOR> The rest of my original post:

I'm a person with a "nervous" twitch as they're sometimes known. Which means my legs (at least one, not both usually) are generally moving at least a little. That being said good posture generally indicates a foot flat on the floor and I try to maintain a relaxed posture for the sake of my future self which constrains my twitching and I believe lowers my metabolic rate to the resting rate which is reasonably associated with decreased calorie burn and a higher risk of mortality at earlier ages. There's plenty of research on this subject (and to be fair, I've never been able to conclusively find any concrete evidence on whether the nervous twitch keeps the body in the more active state or mode, but I am naturally skinny and have heard that the twitching may burn in the order of hundreds of calories a day, a very significant amount).

The human eye is another part of our organism which seems primarily designed for long distance use and of which we have constrained to long stretches of close distance use. I attempt to mitigate this with a relaxed posture which puts me a fair distance from the computer screen for a fair portion of the day (~25"). I've seen recommendations of maintaining at least 15" from your face and the computer screen, but I'm sure it doesn't compare with staring at something an actual distance (>10'?) away which returns the eyeballs to a relaxed natural state.

There are plenty of apps which will remind you to stretch, stand up, look away, drink water, what have you. I'm curious about the experienced engineers and entrepreneurs of hacker news' experiences. Have you used them? Are they effective? Do they disrupt your flow? If it's every 30 minutes does it become a part of your flow state? Are they actually conducive to better productivity by breaking the thought process a bit and letting new thoughts in?

My current maintenance schedule is to drink lots of coffee and water each day, both for the benefits of black coffee and water, but also for the trips to the bathroom which force me to walk a hundred feet and offer me the opportunity to look out the windows of my office space (I have my own office, very conducive to flow, but it's a box with no windows which is not conducive to looking into distances). I also like to do handstands in the hallways to get my blood flowing and use exert my body at least a little bit (I know this is not feasible for all obviously).

If anyone has any good input, I'd love to hear it. I think the engineers posture, eyes, and overall health can often be overlooked at some smaller companies which don't have gourmet health food buffets and yoga rooms.

Cheers from a friend. Cody

<comment><USER3> Hi Cody, It was interesting to read your post. I actually spend all my professional time looking at stuff like this, to optimise my own performance, and that of clients.

The frequent toilet breaks, handstands, water consumption are great ideas. I do similar, but my journey to the toilet in my home office, passes me by a pull-up bar, so I do a bursts of strenuous activity. You could try upping the cardio vascular output.

Your comment about screen distance and eyes is interesting. Personally I can be locked into my screen and in a state of flow for hours at a time, provided the task challenges and engages me. Is this healthy? Time will tell, but my eyesight has remained constant for the last 5 years. That said, I can lucky enough to have views, so I stare into the distance frequently. Could you hang up an epic and beautiful picture, on the far wall? A few other points to consider.. How frequently are you getting outside? How frequently are you talking to other people? Have you done anything like yoga or Tai Chi? Suck activities are a core part of my flow state protocol.. and do wonders for long term physical mainataince. Look into QiGong. feel free to email me.. firstname.lastname@example.com :)</comment></comment>


NFS Latency Issues on Linux - <AUTHOR> https://www.redhat.com/sysadmin/using-nfsstat-nfsiostat <comment><USER2> Article title is: "Using nfsstat and nfsiostat to troubleshoot NFS performance issues on Linux"</comment>


Nowhere to Hide: Assessing Your Work Reputation Online - <AUTHOR> http://gigaom.com/2011/02/20/nowhere-to-hide-assessing-your-work-reputation-online/

<comment><USER2> "By now if you haven't heard of Klout and in a moment of vanity checked your own Klout score, you're in the online minority. "

I have not checked my Klout score, and indeed until just now had no idea what Klout actually was. When I looked at Klout's homepage, it requires a Twitter account to search for someone. I don't use Twitter and I know I'm not the only one, so I think this is pretty bogus as far as a reputation measurement goes.

I don't know how how this guy has decided that means I'm in an online minority, but I do know that his Bartonphink score just took a dip.

<comment><AUTHOR> Klout is really just an arbitrary reputation ranking system, just like the Bartonphink system. However the difference lies in what people conclude from an individual's ranking. People use Bartonphink to rank someone on their pertinence to bartonfink. People use Klout to "measure someone's online influence". This is extraordinarily important to businesses looking to do marketing, sales, customer service, etc.

The point I think you are missing is that Klout, and other ranking systems, can give a quick and objective assessment of someone's value or ability in a certain area.

Here's a list of ranking systems and what they indicate:

Klout -> online influence StackOverflow -> programming expertise FourSquare -> loyalty to a business Credit Score -> fiscal responsibility HackerNews Karma -> ability to provide interesting and pertinent points of conversation

<comment><USER2> I understand that, Vrish - and I agree. My point isn't with Klout specifically, but rather the author's explicit assumption that I would even care about it and that if I don't I'm in some sort of online minority.

My "online influence" has zero effect on my professional or personal life, and I suspect the same is true for many other software engineers. That's the point I was making, and the author's first erroneous sentence is roughly where I stopped reading what he had to say.

<comment><AUTHOR> I disagree, for software engineers it is becoming more important to have a greater online influence. Employers are looking more and more at how involved people are in open source projects (eg. github profiles).

People with blogs and StackOverflow profiles public expose how much they actually know about software development. Then when they have a greater following or more points that is a validation that what are saying is accurate.

</comment></comment></comment></comment><comment><USER3> I hate Klout scores. HATE. But once they evolve, so they're less gameable, those in charge of hiring will definitely pay attention.

<comment><USER4> Unless I'm missing something, I don't see how your twitter influence is important to any job except for paid endorsements.

If I'm hiring an engineer, a project manager, or a designer, I care about their ability to do the job, not about how much they influence their twitter followers.

<comment><AUTHOR> There are numerous benefits to having someone with social influence work for your company. Say your developer has a large following on Twitter.

\- Any problem that they don't know how to solve can be solicited to x number of people. \- If they encounter a bug in 3rd party software that your company uses and publicly bitch about it, the better chance you have to get a timely fix. \- If your company uses/creates open source software, it is more visibile, and there is a greater likelihood that more people will contribute to it. \- They market your company. \- They attract more desirable hires.

</comment></comment></comment><comment><USER5> When and if Klout (or something like it) becomes as ubiquitous as this article predicts, then we should expect a giant upsurge in inane tweet-farming around professional topics. I don't see how anyone benefits from the world thus created.

Would much rather live in a Klout + Quora world than a Klout + Twitter world.</comment>


Ask HN: Programmable Calculator Recommendations? - <AUTHOR> I'm a software engineer with a math background who has to pick up more stats for work. I have solid R and Python skills, but I prefer learning more abstract material with a physical book and my trusty legal pad. Sometimes pulling out a laptop and firing up an RStudio session feels too high friction, and doesn't let me travel as light as I would like.<p>So I was looking for something comparable to the TI-84 in functionality and size. Any thoughts or recommendations here would be appreciated <comment><USER2> Great question. Personally, I would check out the J environment. It is a descendent of APL, but uses standard ASCII characters. It is an array oriented programming environment, so it is built for math and is really fast for an interpreter. Programs are very terse and succinct and measured in characters instead of lines of code. It would be very ideally suited as a kind of very advanced calculator.

J comes with a very lightweight IDE and you can download all kinds of libraries and do things like plotting.

If you are ok with RPN (reverse polish notation), I'd check out some Forth languages which make heavy use of the stack. There is a really cheap (but nice) commercial forth (forth is kind of like a family of languages which share a core ideal rather than one language) called 8th ([https://8th- dev.com/](https://8th-dev.com/)) that has a free version as well. It is literally a small download with a bunch of C executables. You can run fully interactive (just like a calculator), run as a script that calls out to the interpreter, or compile your program to an executable. You can cross-compile to Windows, Linux, OSx, Android, IOS.. etc and depending on your version has libraries for ODBC, SQLite, GUI, encrypted binaries, automotive grade Linux...etc. The creator is super responsive on his forum too.

Of these two, J probably makes a little more sense as a calculator and the plotting is nice, but array programming takes awhile to click. 8th is much lighter weight, very easy to deploy, easy to learn (although forth does take some work), and better documented in my opinion.

I'd also give Julia a try, but it might not be as lightweight as you want.

Another option is to just use a physical calculator if you'd like or Excel?

<comment><USER3> The OP is asking about devices, not software environments on traditional computers.

<comment><USER2> Are they? Must've missed it.

The Voyage-200 is an awesome calculator you might be able to find online still.

SwissMicros reproduce many of the older HP calculators, but smaller and faster. They're supposed to be pretty good. I use an HP-15c myself.

<comment><USER3> They said

> Sometimes pulling out a laptop and firing up an RStudio session feels too > high friction, and doesn't let me travel as light as I would like.

<comment><USER2> I read that as RStudio is too heavyweight, so lighter tools would be preferred. J is a lot lighter in some ways and is an excellent calculator. You probably read it correctly though.

<comment><AUTHOR> Yes, I did mean a physical calculator, but I appreciate your comment nonetheless -- it's all good to know :)

</comment></comment></comment></comment></comment></comment><comment><USER4> Swissmicros dm42? [https://www.swissmicros.com/dm42.php](https://www.swissmicros.com/dm42.php)</comment>


The (Very) Ultimate Productivity List - <AUTHOR> http://blog.noisli.com/100-hacks-to-get-things-done-the-ultimate-productivity-list/

<comment><USER2> It's a good list.

Some of it sounds dubious.

> 10\. Chew gum.

> Gum increases the flow of oxygen keeping you more alert and maintaining > longer focus.

You could have used some of the research about use of gum to help people avoid ear worms

[https://www.reading.ac.uk/news-and- events/releases/PR631000....](https://www.reading.ac.uk/news-and- events/releases/PR631000.aspx)

<comment><AUTHOR> Thanks for the comment. Here you can find some more information about that point [http://www.scientificamerican.com/podcast/episode/gum- chewin...](http://www.scientificamerican.com/podcast/episode/gum-chewing-may- improve-concentrati-13-03-26/)

</comment></comment><comment><AUTHOR> Please, let me know if we're missing something</comment>


Comcast Customers Recording Call Receive Preferential Treatment - <AUTHOR> http://consumerist.com/2014/08/10/comcast-tells-customer-the-only-reason-hes-getting-bogus-charges-refunded-is-because-he-recorded-call/

<comment><USER2> These ISPs all record their calls for "quality assurance purposes", so the idea that there's no record outside of the customer's own to whatever they promised is ludicrous. If we're not doing so already, I think it's time to keep records of all our calls.

I believe there are some places where this might be a legal hiccup, but I'm not sure if those rules still apply if the other party informs you that they're recording it themselves.

<comment><AUTHOR> I think you're right; I've heard a couple times that "This call may be recorded " generally applies to both parties in the US.

</comment></comment><comment><USER3> Next stop: citation/playback of other customer's recordings hosted by consumerist.</comment>


Principal Component Analysis - <AUTHOR> https://leimao.github.io/article/Principal-Component-Analysis/ <comment><USER2> One of the topics that could really be improved with a 3Blue1Brown treatment; but a diagram would do at a pinch - such as what Wikipedia has [0]. Looks like a good writeup nonetheless.

The Wikipedia picture doesn't quite convey the message though - PCA is a variable reduction technique. The Wiki picture could reduce the data from 2 dimensions (as shown) to 1 dimension (distance along the axis that you'd intuitively pick). PCA will let you pick the axis with minimum loss of information.

PCA is most useful when the data is really generated in a low number of changing dimensions (say, plant species & soil nutrients in a controlled experiment) but the data collected is high dimension (length, weight, colour, smell, no. pests, flavour rating by a team of chefs). PCA will tell you that there are really 2 important variables and how to construct them from the observed data - but it won't tell you what they are.

> Positive Semi-Definite Matrix

Aka, it has a real square root. Except not related to the concept of square roots or reals in any obviously meaningful way. The concept annoys me, somehow. It is a pity we have to learn algebra before matrices are meaningful.

Caveat emptor, I'm bad at stats, corrections welcome.

[0] [https://en.wikipedia.org/wiki/File:GaussianScatterPCA.svg](https://en.wikipedia.org/wiki/File:GaussianScatterPCA.svg)

<comment><USER3> A perverse thought pertaining to matrix square-root: [0] I see the notation of M^(1/2). Could the idea be meaningfully extended to define, say, M^(0.7), similar to the way this is meaningful with real numbers?

[0] [https://en.wikipedia.org/wiki/Definite_symmetric_matrix#Squa...](https://en.wikipedia.org/wiki/Definite_symmetric_matrix#Square_root)

<comment><USER4> Sure you can muck around with matrix exponentials and matrix logarithms to think about such things

[https://en.wikipedia.org/wiki/Matrix_exponential](https://en.wikipedia.org/wiki/Matrix_exponential)

</comment></comment></comment><comment><USER5> Together with factor analysis the most abused concept of the biological and social sciences.</comment>


Facial recognition false positives lead to license revocations in Massachusetts  - <AUTHOR> http://www.boston.com/news/local/massachusetts/articles/2011/07/17/man_sues_registry_after_license_mistakenly_revoked/ <comment><USER4> The article tries to make it sound like this is some kind of a computer-age cyber-problem, but in fact, any face recognition technology, including the Mk. 1 human eyeball and brain, is going to have a certain false positive rate. Actually, the article says the pictures are already reviewed by humans before it's decided there is a match.

The real problem, in fact the only problem in my opinion, is the "guilty until proven innocent" approach of the state. They are sending letters which state that the license has already been revoked! If they sent a letter saying "we strongly suspect fraud, you must verify your identity in 30 days", I would not have a problem with that, as long as they have a decent match.

Instead, we get talk about how "driving is a privilege". Guess what - <USER2> for the state is also a privilege, and people who abuse the citizens who pay their salaries should lose it.

<comment><USER5> I think in this situation, more arguements should be made that driving is not a privilege, it is an unfortunate necessity of modern life. What percentage of Americans could work without a car?

<comment><USER6> Don't most Americans live in cities, now? Dallas has awful public transportation, but hypothetically, you could use it to get to work - it would just turn your 30-60 minute commute into a 2.5 hour adventure.

<comment><USER7> Public transportation would be faster, more effective and comfortable then cars if more people used it.

<comment><USER8> I disagree. In Switzerland they have some of the best public transport in the world and I still tend to chose car fairly often. Public transport has the advantage that you can do something (e.g. watch movies, read books, etc.) while traveling while in a car that time is thrown in the trash.

But the problem is that public transport goes _near_ where lots of people want to go but doesn't go where any _person_ actually wants to go. This means further traveling time after the public transport bit is finished. And probably connections as well. This means, for me, that public transport takes about twice as long to get anywhere.

In my opinion the future is robot controlled cars. All the benefit of public transport with none of the inefficiencies, etc. Public transport is just an intermediate step.

<comment><USER9> The best thing about public transport in cities is that you don't need parking space. Hunting for parking space can easily take more time than you save by getting directly to your destination, and public parking can be quite expensive.

That said, many offices have reserved parking, which fixes this - though that real estate is valuable.

<comment><USER8> Well if my idea comes to fruition the automatic car service would only need parking for "overflow" cars when not in use. Some percentage of the system would always be in use so the cars would only not be in use when they were being repaired/upgraded/whatever.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> If I am not misinterpreting the article and, "his driving privileges were returned...after 10 days..." is the time between receiving the letter and having his name cleared, I am impressed that the government moved that quickly. Most of the interactions I've witnessed with the DMV, albiet not nearly as serious, have taken an order of magnitude longer to clear up.

That being said, it is ridiculous for the state to revoke a drivers license with no warning. This situation could have been avoided if the state merely gave the alleged fraudsters a few weeks to present the required documentation before revoking the license.

Overall, I found this to be the most concerning quote in the article:

"A driver's license is not a matter of civil rights. It's not a right. It's a privilege," she said. "Yes, it is an inconvenience [to have to clear your name], but lots of people have their identities stolen, and that's an inconvenience, too."

With this mentality, who knows what future "inconveniences" await Pennsylvania residents in the name of security...

<comment><USER11> _If I am not misinterpreting the article and, "his driving privileges were returned...after 10 days..." is the time between receiving the letter and having his name cleared, I am impressed that the government moved that quickly._

You probably right that 10 days is "quick" for a government, but ten days is a long time to be without a license if your work requires a valid license.

Similarly, the eleven day notice (well less considering mail travel time) is BS. I travel a lot for business and two+ week trips are not out of the ordinary. There should be at least 30 day notice.

</comment></comment><comment> a-priori At 1500 suspension letters per day, 365 days per year (optimistic...), 1000 false positives per year is a 0.1% false positive rate.

I think that's a fairly good rate if a false positive only meant that a _human_ had to verify a person's identity, but not low enough to warrant automatically suspending a person's license.

<comment><USER12> "The software then displays licenses with similar-looking photographs - <USER3> with two or more images that have a high score for being the same person. Registry analysts review the licenses and check..."

A human did verify the false positives.

</comment></comment><comment><USER13> Part of this problem is their using software L1. L1 has terrible performance but their EULA states that you can't refer to them by name in Academic papers. So their always refereed to anonymously as the"Commercial Competitor".

<comment><USER14> This sounds fishy. IANAL, but what would be the possible repercussions of mentioning their name? Having your license revoked seems like the maximum possible punishment, and would this really stop a tenured professor?

<comment><USER13> I'm not sure of all the details. I recently organized a face detection competition. And we included a couple of commercial face detectors for comparison. My boss informed me that since we purchased them under an education discount program we had to refer to them as "Commercial Competitors".

My view might be slightly skewed since the basis of the competition was to make it hard (low light, noise, occlusion, pose, atmospheric blur) and the commercial competitors are trained on easier datasets (close range, well lit, uniform pose and expression). While L1's system would perform better on driver's license images false positives are going to occur in any system. So when it flags a person it should be regarded as something fishy might be going on instead the oracle says this person is a terrorist who buys alcohol for teens, lock him away!

</comment></comment></comment><comment><USER15> "We send out 1,500 suspension letters every day."

Assuming a single person does not receive multiple suspension letters, and estimating the number of business days in a year to be 250, that's 375,000 drivers receiving letters per year.

Using 4,645,705 as the number of drivers in Massachusetts[1], 0.8% of drivers get suspended per year. That seems high.

[1] Source: [http://www.statemaster.com/graph/trn_lic_dri_tot_num- transpo...](http://www.statemaster.com/graph/trn_lic_dri_tot_num- transportation-licensed-drivers-total-number)

</comment><comment><USER16> > An antiterrorism computerized facial recognition system that scans a > database of millions of state driver's license images had picked his as a > possible fraud.

> Last year, the facial recognition system picked out more than 1,000 cases > that resulted in State Police investigations, officials say.

That's a lotta terrorists.

</comment><comment><USER17> So while it appears Massachusetts does collect fingerprints, from this article it would seem that the software does not or is not very effective at cross referencing them with photographs.

Similar case from 1903: [http://www.futilitycloset.com/2011/04/29/mistaken- identity-2...](http://www.futilitycloset.com/2011/04/29/mistaken-identity-2/) which "became a strong argument in favor of the new science of fingerprinting."

<comment><USER11> _So while it appears Massachusetts does collect fingerprints_

For driver's licenses? Not as far as I know - I've never been fingerprinted for a MA license.

</comment></comment><comment><USER18> The problem is similar blood tests. Even a seeming small false-positive rate can result in massive disruption to the lives of many people. Run a "99.9%" accurate test on a million-person database - if a false-positive isn't just an annoyance but screws up a person's life, you've screwed up the lives of 1,000 people.

</comment><comment><USER19> FTA: Registrar Rachel Krapielian said that protecting the public far outweighs any inconvenience Gass or anyone else might experience.

"A driver's license is not a matter of civil rights. It's not a right. It's a privilege,'' she said. "Yes, it is an inconvenience [to have to clear your name], but lots of people have their identities stolen, and that's an inconvenience, too."

This person is why I'm a libertarian.

<comment><USER20> If the driving licence were a right, on what basis would this be the case? Do you think this would bring down the cost of driving? If so, why?

I'm having a hard time believing that this kind of deregulation would be helpful, but maybe it would? Perhaps if private road providers were more common, there would be a wider range of options. Can't see that flying though... people seem to like to drive without paying for the road at point of use...

<comment><USER21> People are driving on the road paid for by their taxes. And freedom of travel by automobile is a liberty not a right because it can be taken away, as this article appears to document, unjustly or in criminal matters, justly.

<comment><USER19> Both life and liberty are rights which may be forfeit by criminal action. Simply because the justice system can revoke your life does not make your life a privilege as Ms Krapielian would have us believe.

The simple fact of the government paving all public thoroughfares does not somehow mean that it is now a privilege to walk upon them or drive on them.

<comment><USER21> I don't know who Krapielian is. Rachel Kaprielian(1) was the one who made the statements: "There are mistakes that can be made." and the real jewel "Yes, it is an inconvenience [to have to clear your name], but lots of people have their identities stolen, and that's an inconvenience, too."

(1) <http://www.linkedin.com/pub/rachel-kaprielian/4/787/564>

</comment></comment></comment></comment></comment><comment><USER22> For a nontrivial number of people, saying that "driving is a privilege, not a right" is equivalent to saying "being able to remain employed is a privilege, not a right".

What's the right way to deal with this?

<comment><USER23> Speak to your state legislators. Ask for a rule mandating an opportunity to present evidence to an impartial adjudicator before any license suspension.

<comment><USER24> Or you can not waste you time and do what will actually result in the required change: Either make a campaign contribution to a person or persons capable or changing the law or have a lobby group do it for you at a similarly significant cost to you. Even if you manage to outbid the private contractors this year (which is highly unlikely), do you seriously think you can out bid the largest defense contractors year after year, while they are busy raking in $14.5 billion every year from the 37 other states participating?

That is the only "legal" way to change laws in the US.

Or we can call that battle what it is: lost. Spend your time and effort (and money) and go invest in those security contractors so that you will have a nest egg waiting if ever you are out of work as a result of losing you license for 2weeks+.

Or to put another way: "Life, liberty, and pursuit of happiness" is all conditional upon what matters to people with money and power and which methods they use to ensure they continue to have money and power.</comment></comment></comment>


Wt – C++ Web Toolkit - <AUTHOR> https://www.webtoolkit.eu/wt <comment><USER2> I used Wt about a year ago for an application at work. I was able to write a GUI program that could be accessed at a web address or with a native Qt application, and Wt was equivalent enough (API-wise) that I was able to template between the two. Really neat actually. There was one place where the GUI was defined and you could choose whether you wanted web, native, or both! Only stumbling block was when I needed some opengl (webgl), but with a fairly minimal abstraction I was and to get that working in both two.

Wt felt very polished and worked exactly as I expected.

<comment><USER3> A propos Qt.

There is Qt for Web Assembly. [https://www.qt.io/qt-examples-for- webassembly](https://www.qt.io/qt-examples-for-webassembly)

And WebGL streaming [https://www.qt.io/blog/2018/11/23/qt-quick-webgl- release-512...](https://www.qt.io/blog/2018/11/23/qt-quick-webgl- release-512#what-is-webgl-streaming)

<comment><USER4> The Qt port for WebAssembly still has zero accessibility support, e.g. for blind people with screen readers. Assuming Wt is using standard HTML form controls, it shouldn't get in the way of accessibility. Of course, the app developer still needs to follow good accessibility practices, such as labeling images and not conveying information through color alone.

<comment><USER5> While it is unfortunate, in 30 years of software development that has never been a requirement for the projects I have been involved unless the customer was some kind of governmental institution and made it part of the acceptance criteria.

So unless there is a mindset change, that will keep happening.

<comment><USER6> Seriously?

Not just govs, but just about all large orgs serving web apps have accessibility requirements.

<comment><USER5> Depends pretty much on your jurisdiction, then in many countries even if that is required by law, trying to make a lawsuit out of it will lead nowhere, as most countries aren't so lawsuit friendly as US.

Assuming that there is a court willing to hear it, probably by the time it reaches the first audience there is a new website in place.

</comment></comment></comment></comment></comment></comment><comment><USER7> With 'modern C++' you can make APIs way nicer than the Java-like API going on here. Lambdas really help, along with RAII which has already been around. I have an API going where the following syntax creates a div with a 'toolbar' class and a toggle button with the 'edit' class and updates the DOM (C++ running in WASM, using IncrementalDOM for the DOM access):

      ui.div()("toolbar")([&]() {
        ui.button()("edit")("selected", editing)("click", [&](emscripten::val target) {
          editing = !editing;
        });
      });

This works by having `.div()` etc. return an `Elem` type whose constructor opens an HTML element and destructor closes it, with various overloads of `operator()` letting you set attributes, bind events or add child elements.

Here's a video of some results with C++ and CSS: [https://twitter.com/snikhilesh/status/1279913032471031809](https://twitter.com/snikhilesh/status/1279913032471031809)

I should do a writeup about this soon...

<comment><USER8> So what do the compiler errors look like when you mess this up? Say, you use the wrong argument passing for one of the lambdas.

<comment><USER9> Exactly what I came here to say.

The error messages produced by g++ for anything template related are a really difficult hurdle to overcome as a beginner. I am sure once you mastered it, it does make sense -- but right now it's a source of frustration for me.

<comment><USER5> concepts will fix that.

For the time being, any library writer can improve their own error messages using a mix of constexpr if, static_assert and enable_if.

<comment><USER7> Yeah I'm looking forward to seeing how concepts work out in practice.

Also, to clarify on the original point, in this case it doesn't require that much template trickery. Most attributes could be handled as `.foo(Foos::BAR_1)` to set HTML attribute `foo="bar_1"` for example and have things still be 'type safe' on the C++ side. I just pass strings through right now to have a catch-all API, then I could go back on it after some real use and see what styles come in practice.

The only template it happens to use right now is the usual `template<typename F>` with `F &&f` to let you pass an inlineable lambda. I could use `static_assert` as you say, with `std::is_invocable_v`, and offer a nicer error message when that doesn't match.

</comment></comment></comment></comment></comment><comment><USER10> Making a front end library/framework/toolkit without screenshots and example code should be made punishable by law.

<comment><USER11> The whole site is run on it, and your working examples are there just had to click on documentation [https://www.webtoolkit.eu/wt/documentation](https://www.webtoolkit.eu/wt/documentation)

<comment><USER10> Oooh, that's nice

</comment></comment></comment><comment><USER12> If curious see also

2013 [https://news.ycombinator.com/item?id=5997034](https://news.ycombinator.com/item?id=5997034)

2010 [https://news.ycombinator.com/item?id=1098282](https://news.ycombinator.com/item?id=1098282)

2009 [https://news.ycombinator.com/item?id=886900](https://news.ycombinator.com/item?id=886900)

</comment><comment><USER13> I tried using Wt for a site almost a decade ago, it seems. The layout managers would make the site so terribly jittery that it could cause motion sickness.

My use case for Wt at the time as "I know C++ well and I don't want to learn anything else." I don't think I'll ever have a better use case for it and I don't think that one was very good to begin with.

The best use case I can imagine is something like "We have a lot of existing C++ code which we need to turn into a web app." But even then, why does the C++ code need to manage the DOM? It almost certainly doesn't.

</comment><comment><USER14> While certainly impressive, the Hello World example in their documentation is in no way preferable to writing JavaScript.

</comment><comment> c-smile Am I right that this is close to ASP.NET thing

       <asp:textbox text="hello world" runat=server />

In particular to that runat=server part?

So widget gets rendered to HTML on server side with events sent to it from client? That may work for logical events like click but not for mousemove (too expensive) ...

</comment><comment><USER15> It's hard to compete with Open Source Libre libraries and lower C++ interest in new developers, not to mention developing in C++ is harder than many other languages.

My employer still struggles to this day finding good recent grads remotely interested in C++. In contrast, Java and Javascript skills are easy to find in the market.

Edit: Added "Libre"

<comment><USER16> C++ people don't do CRUD webshit. C++ is for compilers, HFT, machine learning, browsers, search engines, robotics. When C++ touches "the web" it's in the form of something like Envoy or HAProxy, not exactly application layer. For CRUD webshit, there are literally hundreds of options out there that largely automate the entire process (Rails/Django/Spring). There is no reason to use C++ for it not just because of the timesink but because the lack of safety makes it an aggressively bad idea. You would get all kinds of "I thought that wasn't a problem in the 21st century anymore" type of problems.

<comment><USER17> That's the illusion that got me into C. Reality I found is, where I live at least, C is for legacy code and code that runs in very bad hardware.

<comment><USER16> What illusion are you talking about?

</comment></comment></comment></comment><comment><USER18> I always liked Wt. I haven't used it in quite a while. What's it like these days?

</comment><comment><USER19> So, Wt is about having the server do a bunch of computational work for rendering the UI. Now, I'm not a web developer, so I may be talking nonsense, but I don't see how that's reasonable:

1\. It doesn't scale, or if you're rich - it's annoying to scale. 2\. It interferes with the client/user's ability (albeit theoretical) to decide how they want to present the information 3\. It seems to go against what are, or used to be, the principles of the web: Interlinked, clear-text, markup which the client renders as it sees fit.

<comment><USER20> The Wt backend spits out HTML/JS (or sometimes PDF or svg for charts), like any other server-side framework. It's not replacing the browser's renderer.

<comment><USER19> <html> <body> <img src="/path/to/my/rendered_output.png"> </body> </html>

This is also spitting out HTML...

</comment></comment></comment><comment><USER21> Wait, is this using http/html, or something else? I'm not sure I understand the "web" part in this.

<comment><USER22> It is. But it is abstracting over http/HTML/JavaScript/rpc(ajax) with c++ classes

</comment></comment><comment><USER23> Isn't this like C# with ASP.Net? Or is there any other benefit to it?

<comment><USER5> ASP.NET doesn't run everywhere where there is a C++ compiler, including embedded devices.

</comment></comment><comment><USER24> What's the real advantage of using this over HTML template rendering?

<comment><USER25> I will try to be brief and go to the point.

Wt is different to templating. It's server side rendering and the widgets communication is transparent, based on slots and receivers in the server side.

If you came from java it has similarities to Vaadin.

It has more goodies, websockets, DB...

</comment></comment><comment><USER26> Is this just CGI?

<comment><USER27> Kind-of, but you write webapps as if you were writing desktop apps: widgets, layouts, etc.

Wt can be compiled to its own webserver (which you would use directy if on an embedded device oruse behind a reverse-proxy for other cases), or you can compile it to a FastCGI module you can run with Apache.

</comment></comment><comment><USER28> I find it irritating that even after reading their front-page and the "How you can use WT" I still have no clue what it is supposed to be. Is this an embedded browser? Is it a C++ app GUI that allows you to use HTML like construction? Is it an emscripten application? How can it work without JS enabled? Is it compiled into pure WebASM? What the heck do they mean by connection? What connection? What does have PDF and DB to do with all that? Etc.

Very poor marketing imo. After reading all this I have even less clue what it is supposed to do.

<comment><USER20> It works without JavaScript because it can render everything server-side. If the user has JavaScript it uses websockets or Ajax to fetch updates from the server, but if it doesn't have those it can just reload the whole page like you would with a CGI application.

"Qt, but for web applications" would be a short and basically accurate descriptor. You slot together widgets in C++ and it works out how to lay them out and connect actions taken by the user to your event-handling code, which lives on the server.

The PDF thing is for rendering reports to PDF, instead of HTML. Not useful unless you're in a corporate sort of space, but when you want a PDF report you do want something like that. The DB thing is an ORM that makes basic CRUD operations on your database easier.

<comment><USER29> Oh strange, I completely assumed from the start that it was referring to front end C++ using Webassembly, similar to how some rust libraries do it. Never occurred to me this is server side.

<comment><USER30> Wt comes from many years before WebAssembly.

</comment></comment></comment></comment><comment><USER31> WrDesigner author here. I started the QtDesigner-like tool for Wt because I had a project where I needed to expose some existing C++ code on to the web. In the end I never used it. As I learnt web technologies, I found much flecible and easier to expose an API to the web using QWebChannel and then do the frontend with one of the existing frameworks (Vue, React, etc).

</comment><comment><USER32> painful

</comment><comment><USER33> Why some people can't liberate themselves from C++?

<comment><USER34> Because we're already free.

<comment><USER35> Best comment</comment></comment></comment>


What's your best weapon in the war against procrastination? - <AUTHOR>

<comment><USER2> Take my laptop to a study room at the public library and leave the home office. Additionally, make sure I can't easily check my email, newsfeeds, etc. on that laptop. Then I position myself so other people can see my screen so I'm shamed out of looking like one of those types that doesn't use their computer for anything useful. That is usually enough to get the ball rolling if I'm stuck and I can be productive at home again later.

</comment><comment><USER3> Beeminder.com</comment>