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

Go

Name: Anonymous 2012-06-23 6:16

Currently running this bitch on a server with 24 processors clocked at 2.6Ghz, 16GB of ram and fiber connection. Currently pinging about 300-400 IP addresses/second. And the glue holding this bitch together is Go. Look at that simple concurrency model and message passing, it's a thing of fucking beauty. Now to get this running on the other 4 servers just like it.

http://pastebin.com/rqEvpszX
Currently running at: 177 valid IPs/second, 582 IPs/second

And I know that the last part is a little hacky and that the IP functions should be moved to their own source file. Bite me.

Why aren't you using Go /prog/?

Name: Anonymous 2012-06-23 12:43

>>11
If you're thinking semicolon and newline are both separators, like in bash, you'd be wrong. Go actually has ``semicolon insertion'' like JavaShit, so they could attract BASIC/Ruby/Python programmers who use newlines. You might think it's harmless, but it makes the grammar meaningless. In the grammar, all statements are terminated by semicolons, but the lexer inserts ``pretend'' semicolons before newlines depending on the last token.
http://golang.org/ref/spec
The formal grammar uses semicolons ";" as terminators in a number of productions. Go programs may omit most of these semicolons using the following two rules: [...]
http://stackoverflow.com/questions/10826744/semicolon-insertion-ala-google-go-with-flex
One caveat. You should never put the opening brace of a control structure (if, for, switch, or select) on the next line. If you do, a semicolon will be inserted before the brace, which could cause unwanted effects.
FORCED K&R BRACING OF CODE!

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