Simple side-view water simulation

Would anyone have an idea on how hard it would be to implement this non-physics wave simulation in codea? I think it would be pretty neat for many projects!

Here’s a video: http://www.youtube.com/watch?v=fhjPBvER88g&feature=youtu.be

The code in objective C is there:
http://www.cocos2d-iphone.org/forums/topic/waves1dnode-water-simulation-for-side-view-games/

@Rodolphe - try overlaying sine curves

@West already did: http://www.twolivesleft.com/Codea/Talk/discussion/4588/dynamic-2d-water/p1