Skip to content

Instantly share code, notes, and snippets.

@5HT
Last active December 17, 2015 01:49
Show Gist options
  • Save 5HT/5531209 to your computer and use it in GitHub Desktop.
Save 5HT/5531209 to your computer and use it in GitHub Desktop.
Чат на нитрогене
body() -> wf:comet_global(fun() -> loop() end,chat),
[ #panel{id=history}, #textbox{id=message}, #button{postback=chat}].
event(chat) -> wf:send_global(chat, wf:q(message)),
loop() -> receive Message -> wf:insert_bottom(history, #span{text=Message}), wf:flush() end, loop().
@sumerman
Copy link

sumerman commented May 7, 2013

Отформатируй, будь человеком, на oneliner всё равно не тянет :-)
3я строка какая-то недописанная кмк.

@5HT
Copy link
Author

5HT commented May 7, 2013

Она недописанная, но работает :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment