Poor Spain. :/ I personally think that stabbings, bomb attacks and vehicular attacks are becoming more frequent because guns are a lot harder to get in countries other than the USA. There's no stopping the aforementioned attacks. Maybe make sure you can only purchase military knives if you pass a psychological test. For bombs, that would just involve a lot more Big Brother (George Orwell's 1984 all over again). Vehicles are almost impossible to stop because of how hard it is to get the perpetrator in the vehicle to stop and you can't just stop giving vehicles to those who have mental illnesses.
We're ****ed, basically.
Don't h8 m8 my opinions ain't b8.