Skip to content

Instantly share code, notes, and snippets.

View ashgti's full-sized avatar

John Harrison ashgti

View GitHub Profile
#include <wtypes.h>
#include <errno.h>
#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <winternl.h>
#include <process.h>
#include <iostream>
typedef enum {
// Emulate 'select' behavior on Windows for Pipe handles, both anonymous and named pipes.
// See `SelectHelper::Select` below.
// clang-format off
#include <wtypes.h>
#include <errno.h>
#include <fcntl.h>
#include <io.h>
#include <winbase.h>
#include <winternl.h>
@ashgti
ashgti / Sample output
Created October 3, 2024 16:06
oso_prefix bug with ld in Xcode 15.3, 15.4, 16.0
oso_prefix (no symlinks) ld:
0000000000000000 (?) non-external
0000000000000000 (?) non-external /var/folders/_0/_vrx1th904x4bsf1c0_w4bhw00g80m/T/linker_path_bug/srcs/
0000000000000000 (?) non-external main.c
0000000066e86ece (?) non-external build_outputs/main.o
0000000100003f58 (__TEXT,__text) non-external
0000000100003f58 (?) non-external _main
0000000000000034 (?) non-external
0000000100003f58 (__TEXT,__text) non-external
{ patterns = (
{ name = 'comment.block.perl6';
begin = '^=begin';
end = '^=end';
},
{ name = 'comment.line.number-sign.perl6';
match = '#.*$';
},
{ name = 'string.quoted.single.perl6';
begin = "'";
@ashgti
ashgti / Perl6Grammar.pm.html
Created March 1, 2015 08:27
Perl6 Grammar with syntax applied from the perl.tmbundle
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<title>Perl6Grammar.nqp</title>
<style media="screen">
atom-text-editor,
:host {
background-color: #002b36;
color: #839496;
}
@ashgti
ashgti / syntax-sample
Last active August 29, 2015 14:16
Syntax highlight example
<!DOCTYPE html>
<html>
<head>
<title>syntax-check.pl6</title>
<style media="screen">
#atom-text-editor,
:host {
background-color: #002b36;
color: #839496;
}
@ashgti
ashgti / wtf.cc
Last active December 12, 2015 00:58
Don't do this ever please. If you have to, please comment it.
#include <stdio.h>
struct foo {
struct dummy {
int i;
};
typedef int dummy::*_bool;
foo(int f) : f_(f) {}
int f_;
Index: lib/profile/GCDAProfiling.c
===================================================================
--- lib/profile/GCDAProfiling.c (revision 173961)
+++ lib/profile/GCDAProfiling.c (working copy)
@@ -269,6 +269,9 @@
for (i = 0; i < num_counters; ++i)
fprintf(stderr, "llvmgcda: %llu\n", (unsigned long long)counters[i]);
#endif
+
+ for (i = 0; i < num_counters; ++i)
#include <iostream>
using namespace std;
class a {
public:
struct dummy { int i; double j; };
typedef int dummy::* _bool;
};
typedef int bar;
#include <stdio.h>
struct FOO {
class_loader::class_loader_private::registerPlugin<A,B> &bar;
};
static FOO foo(baz);
int main(void) {
foo2.bar = 3;