This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BenchmarkSetGetMutex 2000000 668 ns/op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import czmq | |
var pull = zsock_new(ZMQ_PULL) | |
var rc = zsock_connect(pull, "inproc://zsock_test") | |
var push = zsock_new(ZMQ_PUSH) | |
rc = zsock_bind(push, "inproc://zsock_test") | |
for i in countdown(100000000, 1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actor: | |
function function_ref: | |
commands: | |
command "FRONTEND": | |
stuff ... | |
command "PAUSE": | |
stuff ... | |
command "RESUME: | |
stuff ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, streams, parsexml, strutils | |
if paramCount() < 1: | |
quit("Usage: parse filename[.xml]") | |
var filename = addfileExt(paramStr(1), "xml") | |
var s = newFileStream(filename, fmRead) | |
if s == nil: quit("Cannot open the file" & filename) | |
var x: XmlParser | |
open(x, s, filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, streams, parsexml, strutils, macros | |
macro readModelAndBuildAST(filename: string): stmt = | |
let | |
inputString = slurp(filename.strVal) | |
var s = newStringStream(inputString) | |
var x: XmlParser | |
open(x, s, filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wow.nim(10, 30) Error: type mismatch: got (NimNode) | |
but expected one of: | |
macros.newIdentNode(i: NimIdent) | |
macros.newIdentNode(i: string) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, streams, parsexml, strutils, macros | |
macro readModelAndBuildAST(filename: string): stmt = | |
let | |
inputString = slurp(filename.strVal) | |
var s = newStringStream(inputString) | |
var x: XmlParser | |
open(x, s, $filename) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ( | |
load="imtcp" | |
) | |
input(type="imtcp" port="514" ruleset="test_dynamic") | |
template(name="had_cee" type="list") { | |
constant(value="CEE WOOT WOOT: ") | |
property(name="msg") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input(type="imudp" port="514" ruleset="to_sagan") # listen for udp on port 514 | |
input(type="imtcp" port="514" ruleset="to_sagan") # listen for tcp on port 514 | |
## REMOTE RULES ############################################################### | |
# send all remote logs to sagan for analysis | |
ruleset(name="to_sagan") { | |
action(type="omfile" file="|/var/run/sagan/sagan.fifo" template="sagan_template") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<known_projects> | |
<!-- ZeroMQ Projects --> | |
<use project = "zmq" | |
repository = "https://github.com/zeromq/libzmq" | |
test = "zmq_init" | |
cmake_name = "ZeroMQ" /> | |
<use project = "czmq" |