Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Node.JS and C

Name: Anonymous 2012-09-29 11:20

What do you guys think? My reason for such a weird combination is very easy non-blocking glue code yet a decent programming language to write some the core logic.

It's for a web crawler btw.

Name: Anonymous 2012-09-29 11:29

a decent programming language
No really, what are you referring to?

Name: Anonymous 2012-09-29 11:34

>>2

Wouldn't you prefer C over JS to?

Name: Anonymous 2012-09-29 11:47

>>3
noko
... Anyway, since node.js just uses stat() or something similar to do its thing, you might as well write the equivalent to what you would have done in JS entirely in C (with the necessary libraries) rather than including an entire javascript engine.
On the flip side, you could probably write the entire thing in JS with about a third of the effort.

Name: Anonymous 2012-09-29 11:52

WEB CRAWLER?

JUST DO IT IN PERL AND ENJOY YOUR TIME OUTSIDE YOUR ROOM.

Name: Anonymous 2012-09-29 13:16

why would you even use an archaic language like C? JS can do anything C can do and is much faster

Name: Anonymous 2012-09-29 13:54

>>6
fuck off javashit KIKE

Name: Anonymous 2012-09-29 14:17

Name: Anonymous 2012-09-29 14:58

>>8
I don't believe I've seen such a strawman since reading xkcd.

Name: Anonymous 2012-09-29 15:35

enjoy your single-threaded shit and forced use of the node.js web server

Name: Anonymous 2012-09-29 15:44

javascript is a medium sized dog

Name: Anonymous 2012-09-29 15:55

>>8
Too much truth

Name: Anonymous 2012-09-29 15:56

>>12
yeah, definitely too much for >>9 to take

Name: Anonymous 2012-09-29 16:02

>>1
If you want to do some really heavy nonblocking network IO, write your shit in C with libevent or libev.  Node.js is good for nonblocking hello world web services which don't touch any sensitive data.

Name: Anonymous 2012-09-29 16:09

>>12,13
Aside from the fact it's obvious you just replied to yourself, that (>>9) was a purely objective comment.
While I do use node.js because it's very easy to get a simple websocket interface going, I honestly feel bad about it as JavaScript is a bad language and the event model makes mashed spaghetti of a program that would have otherwise been perfectly legible.
The video, however, made the dark bear unrealistically idiotic, giving him arguments that were easily refutable yet dissimilar to arguments an actual person would have made in his position and with his purported experience and knowledge.
The lighter bear was also made very unrealistic; he sounded very carefully scripted, as if the author thought his lines were supremely and inimitably witty. They're not, ironically, for the very reason that it is unrealistic. Such is language reminiscent of Randall.

IHBT

Name: Anonymous 2012-09-29 16:17

>>15
שלום

Name: Anonymous 2012-09-29 16:38

>>14
C
Shalom!

Name: Anonymous 2012-09-29 18:33

>>15
Actually 13 isn't me at all, but since the timestamp is so close I admit it does look that way. Regardless of the scripted nature of it, it perfectly illustrates the situation surrounding node fanfaggotry and the consequences of such, which was the point.

Name: Anonymous 2012-09-29 18:38

>>13 reporting in

im posting 6 minutes after >>18 just to spite him

Name: Anonymous 2012-09-29 22:14

javascript is the god language

Name: Anonymous 2012-09-29 22:18

protip: you can use C++ memory-map huge files of C structs and access it via node's foreign data access. A struct compiles into 2 or 3 instructions, so there is no performance penalty, and the v8 garbage collector never sees the data.

 I wrote a flight delay predictor using this technique. Each process needs to access about 2gb of data in memory, but each process only uses about 250 mb of working data structures and code.

web crawlers don't usually need to be realtime though, so I'm not sure why you would need to use C at all...

Don't change these.
Name: Email:
Entire Thread Thread List