News for hackers. Stuff that matters.
Re:Idioms: Building High Performance Networking Servers Usin... by sebcat on Friday August 29, 2014 @03:54AM (#8241525)
It's apt to compare Tcl to Node.JS because of the similar I/O-model.

Tcl is slower than Node.JS (a broad statement, but e.g., it's not JITed), and the last time I checked Tcl's event loop was select-based and not epoll/kqueue-based. Looking at the code for 8.6.2, it appears to be like that still.

I like Tcl, but I wouldn't use it for high-concurrency tasks (I would use Go for that). It's nice when you need a DSL to extend your application, or if you want to glue C libraries together, but there are better tools for network code.

Re:Idioms: Building High Performance Networking Servers Usin... by justincormack on Friday August 29, 2014 @04:25AM (#8241615)
The similar IO model? It is just the Unix IO model though, with the caveat to never use blocking IO. Tcl doesn't force non blocking IO like Node, you have to do it yourself.

Event based IO was around by 1999 or earlier, according to the C10k page that we all avidly read backin the day http://www.kegel.com/c10k.html

Re:Idioms: Building High Performance Networking Servers Usin... by sebcat on Friday August 29, 2014 @05:53AM (#8241844)
Both Tcl and Node.JS are built around the concept of an event loop. The preffered way to do IO in both languages is to express your network application as a FSM with callbacks on state transitions. Of course event driven IO is not in any way "owned" by either languages, what I mean is that they both encourage an event-driven IO model.

Am I making myself clear?