Problem description is here https://web.archive.org/web/20160309195130/http://nick.cleaton.net/ramsort.html and here: https://stackoverflow.com/questions/12748246/sorting-1-million-8-decimal-digit-numbers-with-1-mb-of-ram. Inspired by the solution in the first SO answer, using network for storage :)
listen to ICMP packets on loopback address:
sudo tcpdump -i lo icmp and icmp[icmptype]=icmp-echo
Listen on the “destination” port:
socat TCP-LISTEN:3003,fork stdout
Watch & compile:
sudo su --shell /bin/bash
cargo watch -x run
Send some data to the TCP listener:
curl telnet://127.0.0.1:3002 <<< 7