This file contains 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
/* | |
* FINF 0.1.5a (21 Jul 2005) https://tia.mat.br/ | |
* | |
* Interpreter for the "finf" (finf is not forth) language | |
* Copyright (C) 2005 L. A. F. Pereira <l@tia.mat.br> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, version 2. | |
* |
This file contains 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
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <ucontext.h> | |
typedef struct coro_t_ coro_t; | |
typedef struct thread_t_ thread_t; | |
typedef int (*coro_function_t)(coro_t *coro); | |
typedef enum { | |
CORO_NEW, |
This file contains 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
/* | |
* SPSC Bounded Queue | |
* Based on public domain C++ version by mstump[1]. Released under | |
* the same license terms. | |
* | |
* [1] https://github.com/mstump/queues/blob/master/include/spsc-bounded-queue.hpp | |
*/ | |
#if !defined(__ATOMIC_RELAXED) |
This file contains 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
#!/usr/bin/python | |
# https://www.youtube.com/watch?v=hm5qmqHUudQ | |
def regressao_julia(d, k): | |
# A fórmula enorme, segundo a jornalista: | |
return (d - k*k) // (k+k) | |
def raiz(n): | |
tentativa = n | |
while True: |
This file contains 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
#include <chrono> | |
#include <cstdint> | |
#include <iostream> | |
#include <random> | |
#include <sstream> | |
using namespace std; | |
using namespace std::chrono; | |
const uint64_t P01 = 10; |
This file contains 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
New Old | |
movsx esi,BYTE PTR [r14+0x8] movsx esi,BYTE PTR [r13+0x8] | |
mov rdi,r12 mov rdi,rbp | |
add rbx,0x1 add r13,0x18 | |
call 0x412fd0 <strbuf_append_char> call 0x413ed0 <strbuf_append_char> | |
mov rax,QWORD PTR [r15+rbx*8] mov eax,DWORD PTR [r13+0x0] | |
jmp QWORD PTR [rax*8+0x416440] mov rax,QWORD PTR [rax*8+0x4166a0] | |
jmp rax |
This file contains 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
/* parse_number() using C11 _Generic */ | |
/* @lafp, 2015-06-07 */ | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <errno.h> | |
#define parse_number(Input, Output) \ | |
_Generic((*Output), \ | |
int: parse_number_strtoint, \ |
This file contains 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
/* Build with google benchmark */ | |
#include "benchmark/benchmark.h" | |
#include <ctype.h> | |
#include <errno.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> |
This file contains 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
#include <stdio.h> | |
struct error_code { | |
int code; | |
}; | |
struct error_context { | |
const struct error_code *code; | |
const char *msg; | |
const char *file; |
This file contains 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
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <benchmark/benchmark.h> | |
unsigned int odd_constant = 0xdeadbeef | 1; | |
static unsigned int hash_crc32_orig(const void *keyptr) | |
{ | |
unsigned int hash = odd_constant; |
NewerOlder