Profile

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

Stream

 
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
1
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 ...
1
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' ...
1
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

http://www.hackinglinuxexposed.com/articles/20030424.html
1
Add a comment...
 
Very cool presentation, spanning from CPython details to OS scheduling
Inside the Python GIL.: http://youtu.be/ph374fJqFPE
1
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.
1
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
https://youtu.be/_Ik8oiQvWgo?t=2443
1
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 ...
1
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...
2
1
Add a comment...
Work
Occupation
Research Associate
Employment
  • University of Cambridge
    Research Associate, present
  • Imperial College
    RA and PhD candidate, 2008 - 2012
Basic Information
Gender
Male
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Cambridge, UK
Previously
London, UK - Athens, Greece - Sydney, Australia
Links