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
private def metaExists(id: Id[DocumentMeta]): Rx[Boolean] = { | |
metaDir.fileExists(id.value) mapToRx { | |
case Failure(_) => false | |
case Success(exists) => exists | |
} | |
} | |
private def dataExists(id: Id[DocumentMeta]): Rx[Boolean] = { | |
dir.fileExists(id.value) mapToRx { | |
case Failure(_) => false |
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
(in-package #:cl-user) | |
(defpackage #:rwa-contest | |
(:use #:cl) | |
(:export | |
#:address | |
#:address-value | |
#:book | |
#:parse-ranges | |
#:parse-ips |
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
(in-package :cl-user) | |
(defpackage #:peg-combinators | |
(:use #:cl) | |
(:nicknames #:pegc) | |
(:export | |
#:defparser | |
#:defrule | |
#:result |
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
(defconstant +byte-count+ (* 2 1024 1024 1024)) | |
(defconstant +page-size+ 4096) | |
(defconstant +page-count+ (/ +byte-count+ +page-size+)) | |
(defvar *a* (make-array +byte-count+ :element-type '(unsigned-byte 8))) | |
(dotimes (i +page-count+) (incf (elt *a* (* i +page-size+)))) |
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
#ifndef __COM_UTILS_HPP__ | |
#define __COM_UTILS_HPP__ | |
#include <oleidl.h> | |
template<class T> | |
class ComPtr | |
{ | |
public: | |
ComPtr() |
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
#define __STDC_CONSTANT_MACROS | |
#include <stdint.h> | |
#include <inttypes.h> | |
#include <windows.h> | |
#include <stdio.h> | |
#ifdef __cplusplus | |
extern "C" | |
{ |
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
// g++ -O0 -shared -o sehlib.dll sehlib.cxx | |
// OR | |
// cl.exe /nologo /Od /MD /EHac /LD /Fe:sehlib.dll sehlib.cxx | |
#include <iostream> | |
#include <exception> | |
void throws_fn() | |
{ | |
std::cerr << "C++ throws exception" << std::endl; | |
throw std::exception(); |
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
// cl.exe /nologo /clr /Od /MD /EHac /LD /Fe:sehlib.dll sehlib_net.cxx | |
using namespace System; | |
#include <iostream> | |
void throws_fn() | |
{ | |
std::cerr << ".NET throws exception" << std::endl; | |
throw gcnew Exception(); | |
} |
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
// g++ -O0 -shared -o unwind.dll unwind.cxx | |
// OR | |
// cl.exe /nologo /Od /MD /EHa /LD /Fe:unwind.dll unwind.cxx | |
#include <iostream> | |
#include <exception> | |
#include <windows.h> | |
class Foo | |
{ | |
public: |
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
(sb-alien:load-shared-object "unwind.dll") | |
(sb-alien:define-alien-routine | |
("catches_fn" catches-fn) | |
sb-alien:void | |
(fn (* T))) | |
(defun sap-to-callable (ptr) | |
(sb-alien:sap-alien | |
(sb-alien:alien-sap ptr) |
OlderNewer