Cover photo
Dimosthenis Pediaditakis
Works at University of Cambridge
Lives in Cambridge, UK
96 followers|82,800 views


You have a Debian box with mixed jessie/jessie-backports/testing apt preferences ?
Do you need to only upgrade the installed packages which have available updates and which come from testing?

A one-liner for you....

sudo aptitude update; apt-get -just-print upgrade -t testing | grep "^Inst" | awk '{print $2}' > /tmp/upgradeable; aptitude -F%p --disable-columns search '?narrow(?installed, ?archive(testing) !?archive(jessie) !?archive(jessie-backports))' -t testing | xargs -I {} sh -c "grep {} /tmp/upgradeable" | while IFS= read -r package; do echo "Package: $package"; read userkey </dev/tty; if [ "$userkey" == "x" ]; then echo Skipping...; else sudo aptitude install $package -t testing < /dev/tty; fi; echo "-------------"; done
Add a comment...
Don't use black magic to pad your Java objects for avoiding false cache sharing.

Since every JVM implementation does its own thing, just use unsafe and/or JOL tool to get the actual layout.

Now you can go ahead and pad efficiently, and guarantee that the shared variables which are frequently touched by different threads, do not fall on the same cache line. Especially important for volatile member vars.
Code Tools: jol. JOL (Java Object Layout) is the tiny toolbox to analyze object layout schemes in JVMs. These tools are using Unsafe, JVMTI, and Serviceability Agent (SA) heavily to decoder the actual object layout, footprint, and references. This makes JOL much more accurate than other tools ...
Add a comment...
Use the Unofficial Bash Strict Mode (Unless You Looove Debugging). First published in Aaron Maxwell's Newsletter. Let's start with the punchline. Your bash scripts will be more robust, reliable and maintainable if you start them like this: #!/bin/bash. set -euo pipefail. IFS=$'\n\t' ...
Add a comment...
I've met lots of non-amateur Linux users who lack basic knowledge on things they use everyday.

A typical example is ignoring the meaning of directory permissions:   "r", "w", "x", sticky and  setgid bits
Add a comment...
Very cool presentation, spanning from CPython details to OS scheduling
Inside the Python GIL.:
Add a comment...
Why might you declare a pure virtual function and also write a definition (body)?
This is the original GotW problem and solution substantially as posted to Usenet. See the book More Exceptional C++ (Addison-Wesley, 2002) for the most current solution to this GotW issue. The solutions in the book have been revised and expanded since their initial appearance in GotW.
Add a comment...
When Java's aggressive JIT inlining reduces performance, instead of helping.

Aggressive inlining --> bloated compiled instructions footprint --> higher rate of L1 instruction cache misses

Minute 40:43
Add a comment...
How is Java different to Shakira??
"Java heaps (can) lie" ... ☺
This is an updated version of the Russian post I had roughly one year ago, way before Java Object Layout was available under OpenJDK, and the draft I had on GitHub was in infancy. The rationale for this post is to give the "runtime guy" perspective on every single blog post about Java object ...
Add a comment...
Very nice talk, digs all the way down to instructions parallelism and wise cache line accesses
Optimizations are one thing -- making a serious data collection program run 114,000 times faster is another thing entirely. Leaning on 30+ years of programmi...
Add a comment...
Research Associate
  • University of Cambridge
    Research Associate, present
  • Imperial College
    RA and PhD candidate, 2008 - 2012
Basic Information
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Cambridge, UK
London, UK - Athens, Greece - Sydney, Australia