In Interesting Times, the Agateans have devised artillery as we know it, i.e. a closed tube on a carriage, where a chemical reaction in the closed end propels a large rounded stone at some velocity towards a target. The open end of the tube, in keeping with Agatean principles of aesthetic harmony, is moulded into the head of a Hunghungese dog, out of whose open mouth the projectile is expelled.
Firearms are virtually unknown in Ankh-Morpork, apart from the one example of the Gonne. Gunpowder weaponry of any kind is virtually unknown to the rest of the Disc, except perhaps in the sketchbooks of Leonard of Quirm, although gunpowder itself is well known at least to the Alchemists' Guild and ordinary fireworks are apparently quite common.
It is not recognised when one is returned in exchange for Rincewind (who, being so much lighter, has been propelled several yards head-first into a snowdrift in accordance with the principles of momentum) the Wizards don't know what it is. Although Ponder Stibbons has the presence of mind to extinguish the fuse. (When the time comes to return it to Agatean ownership, they ensure the fuse is re-lit, so that it arrives in exactly the same condition as when it left.)
The oldest known cannon on Roundworld is dated 1332 and was found in China (Discworld's Agatean Empire). It is believed, however, that in all probability the Chinese had hand cannons (gonnes?) before the time of Christ! Chinese cannons and guns developed between 1100 and 1300 were given flamboyant names such as "Crouching Tiger Cannon".
In the book, Lord Hong bemoans of the "Barking Dog" inefficiencies, and muses that the average Ankh-Morporkian tinkerer could probably improve on the weapon in ways that even the best Agatean philosophers could not. As it turned out, he was right - in more ways than one. By the end of the 17th century, gunpowder technology had made huge advances in Europe whereas it had long since stagnated in its country of origin.
It's inconceivable that TP was unaware that the "Barking Dog" is also an exothermic chemical reaction that results from the ignition of a mixture of carbon disulfide and nitric oxide. It has been known for centuries; in 1853, Justus von Liebig was using the bright blue flash and the distinctive ‘woof’ sound of the demonstration to enthrall his students.