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
$ clang setjmp-twice.c | |
$ ./a.out | |
Normal execution path of first function! | |
Exception execution path of first function! | |
Exception execution path of first function! | |
Calling longjmp the second time! |
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
$ clang -O2 setjmp-twice.c | |
$ ./a.out | |
Normal execution path of first function! | |
Exception execution path of first function! | |
Exception execution path of first function! | |
Calling longjmp the second time! |
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/env ruby | |
# %% -*- ruby -*- | |
# This script adds a wrapper to emcc: when the value of -o option is an | |
# executable file without extensions(such as mrbc), we would first use | |
# emcc to generate a .js file, then adds a "#!/usr/bin/env node" line at | |
# the top, finally removes the extension and mark the file mode as | |
# executable to pretend creating a binary file. | |
WEBRUBY_ROOT = File.join(File.dirname(__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
$ # testing syro | |
$ wrk -t12 -c400 -d30s http://127.0.0.1:9292/foo/bar | |
Running 30s test @ http://127.0.0.1:9292/foo/bar | |
12 threads and 400 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 186.63ms 75.95ms 712.69ms 71.36% | |
Req/Sec 58.40 66.78 280.00 79.20% | |
16025 requests in 30.09s, 2.81MB read | |
Socket errors: connect 0, read 310, write 0, timeout 0 | |
Requests/sec: 532.63 |
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 <emscripten/emscripten.h> | |
void EMSCRIPTEN_KEEPALIVE c_func_calling_from_js() { | |
printf("This is a c function calling from js!"); | |
} | |
extern void js_func(); |
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 <emscripten/emscripten.h> | |
int EMSCRIPTEN_KEEPALIVE c_func_calling_from_js() { | |
printf("This is a c function calling from js!"); | |
return 0; | |
} |
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
$ clang swap64.c | |
$ ./a.out | |
72057594037927936 |
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
Entering: _mrb_run: 104,5521416,5666064,1484 | |
Calling setjmp in run curr: 0x400, prev: (nil)! | |
Entering: _stack_extend: 5521416,5,5 | |
Exiting: _stack_extend | |
Entering: _mrb_realloc: 5521416,0,44 | |
Entering: _allocf: 5521416,0,44,0 | |
Entering: _realloc: 0,44 | |
Entering: _malloc: 44 | |
Exiting: _malloc | |
Exiting: _realloc |
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
$ clang vatest.c | |
$ ./a.out | |
Type is 0 | |
Value is 5 | |
Type is 1 | |
Value is 12 | |
Type is 2 | |
Value is 19 | |
Type is 3 | |
Value is 26 |
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
/** | |
* A simple theme for reveal.js presentations, similar | |
* to the default theme. The accent color is darkblue. | |
* | |
* This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. | |
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se; so is the theme - beige.css - that this is based off of. | |
*/ | |
// Default mixins and settings ----------------- |