May. 1st, 2012

А вот этого я уже в других языках программирования как-то не видал. Эдакая «лиспо-лямбда» получается:

alexo@codedot:~$ wscat -c ws://localhost:8080/

connected (press CTRL+C to quit)

< (function () {
			socket.say = function(data) {
				data = JSON.stringify(data);
				this.send(data);
			};
		})(undefined)

< (function () {
			socket.say("Hello World!");
		})(undefined)
> "Hello World!"

< (function (data) {
			window.alert(data);
		})("Hello World!")

disconnected

alexo@codedot:~$

Кстати, wscat вчера починили.

Profile

Anton Salikhmetov

November 2018

S M T W T F S
    123
45678 910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 9th, 2025 03:17 pm
Powered by Dreamwidth Studios