Skip to content

Instantly share code, notes, and snippets.

View ashgti's full-sized avatar

John Harrison ashgti

View GitHub Profile
@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;
a = foo()
a.bar = 123 # default
with a:
a.bar = 13213
a.do_stuff()
with a:
a.bar = 5432
a.do_stuff()
cc1plus: warning: -Wuninitialized is not supported without -O
In file included from /Users/harjohn/Projects/serial/src/serial.cc:4:
/Users/harjohn/Projects/serial/include/serial/serial.h:610: warning: ‘class serial::SerialExecption’ has pointer data members
/Users/harjohn/Projects/serial/include/serial/serial.h:610: warning: but does not override ‘serial::SerialExecption(const serial::SerialExecption&)’
/Users/harjohn/Projects/serial/include/serial/serial.h:610: warning: or ‘operator=(const serial::SerialExecption&)’
/Users/harjohn/Projects/serial/include/serial/serial.h:624: warning: ‘class serial::IOException’ has pointer data members
/Users/harjohn/Projects/serial/include/serial/serial.h:624: warning: but does not override ‘serial::IOException(const serial::IOException&)’
/Users/harjohn/Projects/serial/include/serial/serial.h:624: warning: or ‘operator=(const serial::IOException&)’
/Users/harjohn/Projects/serial/include/serial/serial.h:651: warning: ‘class serial::PortNotOpenedException’ has pointe