C Collections is a light and short C implementation of usefull collections. It contains:
fixed type
vectorstring
-int
mapstring
-fixed type
map (svmap)dynamic type
list (dynlist)
#pragma once | |
#ifndef _EXPAND_MACRO_H_ | |
# define _EXPAND_MACRO_H_ | |
# define __DONOTHING(...) | |
# define __EXPAND(...) __VA_ARGS__ | |
# define __COMMA(A) A, | |
# define __CAT(A, B) A ## B | |
# define CAT(A, B) __CAT(A, B) | |
# define __SELECT( \ |
[CCode (cheader_filename = "hello.h")] | |
namespace Go { | |
[CCode (cname = "hello")] | |
extern void hello(); | |
} |
CC := gcc | |
CFLAGS := -fpic | |
LD := $(CC) | |
LDFLAGS := -shared | |
LDLIBS := | |
all:; @echo $(hello ) | |
say:; @echo $(say "hello, world") |
#include <stdio.h> | |
void dummy(float *blblbl) | |
{ | |
int i; | |
for (i = 0; i < 2; i++) | |
printf("%f\n", blblbl[i]); | |
} |
IronBNF is a context-sensitive derivate of the original BNF notation.
The BNF syntax describe a grammar by defining rules, and each rule may be a block that may contain blocks.
#include <stdio.h> | |
#define PRINT(...) CAT(CT(__VA_ARGS__))(__VA_ARGS__) | |
#define CAT(N) DOG(N) | |
#define DOG(N) PRINT ## N | |
/* max supported args is 5 for now */ | |
#define CT(...) VALS(__VA_ARGS__, 5, 4, 3, 2, 1) | |
#define VALS(N1, N2, N3, N4, N5, N, ...) N |
#Spider Protocols
###Enveloppe.proto
message Enveloppe {
required string UUID = 1;
required string PayloadBuffer = 2;
required google.protobuf.Any Payload = 3;
}
def dims(lst): | |
ct = 1 | |
while list in [ type(i) for i in lst ]: | |
lst = sum([ i for i in lst if type(i) == list ], []) | |
ct += 1 | |
return ct |
$ cat Makefile | |
NAME := star my github repo's pliz | |
NAME2 = OK | |
get-%:; $($*) | |
$ make -n get-NAME | |
star my github repo's pliz | |
$ make -n get-NAME2 |