I'm pretty sure an obsidian gun has been done before
The idea is at least as old as 2009, and was possibly created within months of the change to the 3D version. Many threads have been created on this topic, with names like "Cave-in Cannon" and "Midair obsidian generator". The common problem is preventing the superweapon from jamming shut at the muzzle.
See:
http://www.bay12forums.com/smf/index.php?topic=39629.0
there's a design of Orbital Obsidian Cannon which would prevent or at least delay that problem.
Instead of mixing water with magma in the device they should be mixed on the ground.
it is actually not that hard to build, i half-finished the project in .21 but then .25 got out and i abandoned it.
1. Build pump stacks to lift water and magma to the desired level.
2. Build walls around your entire map, high enough to hold magma at the desired level.
b - remember to have a lever-activated drain!
3. Flood the world with magma up to your walls. (or flood with water if you are not feeling hardcore today)
4. Flood the magma lake with water, forming a layer of obsidian high in sky.
5. repeat 3-4 to make it double.
5. Mine away the interior of the lower sky obsidian layer, leaving 3*3 U-shaped unmined rock tiles, separated by 2-tile wide corridors.
6. Channel away the floor in the middle of each 3*3 U, put a magma-proof hatch there, link it to a lever and pull,
7. Build walls to seal each U, making them into O's.
8. Channel away the floor tile immediately andjacent to the middle of any (say, left) wall of 3*3 O, put hatches there and link the to corresponding levers.
9. Mine away the interior of the higher sky obsidian layer entirely, only leaving a wall.
10. Channel the floor above the middle of each O on the lower layer.
10. Flood the upper layer with magma and the lower with water.
11. Remove the wall around your map.
Now, if a layer is pulled, a pair of hatches (or a 3*3 or 5*5 set of pairs) is opened and magma and water fall to the ground in tiles, separated by two squares.
They start flowing and pushing elves and stuff and mix and obsidianize everything.
With sufficient height, the weapon will be able to fire continiously for some time before the obsidian jams the hatches. Even then, you'll be able to fire the other muzzles.
Also, single-shot firing mode should be okay, too.