Skip to content

Instantly share code, notes, and snippets.

Yury Delendik yurydelendik

Block or report user

Report or block yurydelendik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
yurydelendik / record.html
Last active Sep 26, 2017
Record and playback audio.
View record.html
<!DOCTYPE html>
<title>Capture sound</title>
<meta charset="utf-8">
<div id="ask_donate">
<button id="donate">Donate the noise</button>
yurydelendik / sm_emcc.patch
Created Jun 23, 2017
Patch for emcc to enable source maps for wasm
View sm_emcc.patch
diff --git a/ b/
index fdbefe008..54d989c16 100755
--- a/
+++ b/
@@ -145,6 +145,7 @@ class EmccOptions(object):
self.exclude_files = []
self.ignore_dynamic_linking = False
self.shell_path = shared.path_from_root('src', 'shell.html')
+ self.source_map_base = None
self.js_libraries = []
yurydelendik /
Last active Jan 12, 2019
Build wasm maps from C++ file
View helloworld2.html
<!DOCTYPE html>
<meta charset="utf-8">
var memory;
var env = {
sys: {
yurydelendik /
Last active May 12, 2018
Some version control operations


Provides set of operations to efficiently maintain set of patch for long time and be able to submit those for review.


Let's say we clone a repo and 'master' is upstream branch and we will keep it up-to-date on regular base.

We can created a branch for a new feature and will try to keep it fresh and with addressed reviews.

yurydelendik / sqrtOfSqrs.html
Last active Jul 1, 2016
sqrt of squares sum
View sqrtOfSqrs.html
var bin = atob(
var ar = new Uint8Array(, (ch) => ch.charCodeAt(0)));
var input = [3, 4];
var env = {env: { callback: (resultPtr) => {
resultPtr |= 0;
if (input.length === 0) return 0|0;
var data = +input.shift();
View !

Using WebAssembly code as JavaScript modules

Simple project structure and dependencies:

# Prepare directory and project
mkdir answer
cd answer
npm init # answer all/most with default values
npm install jspm
# We need system.js for magic
yurydelendik / parse_code_annotations.diff
Last active May 3, 2016
SM WASM with debug information
View parse_code_annotations.diff
# HG changeset patch
# User Yury Delendik <>
# Date 1462291965 18000
# Tue May 03 11:12:45 2016 -0500
# Node ID 88863f30dd23ebd15831f55b73e0e6df0ec614ae
# Parent 77cead2cd20300623eea2416bc9bce4d5021df09
Parse code annotations
diff --git a/js/src/asmjs/WasmBinary.h b/js/src/asmjs/WasmBinary.h
--- a/js/src/asmjs/WasmBinary.h
yurydelendik / hello.c
Created Apr 25, 2016
Example of wast with some debug comments
View hello.c
struct z {
int x;
float y;
} i;
int main() {
struct z t[10];
int i, j;
for (i = 0; i < 9; i++)
t[i].x = i;
yurydelendik / llvm-dgb-no-virt-v2.diff
Last active Jun 30, 2016
llvm debug hack for virtual registers
View llvm-dgb-no-virt-v2.diff
Index: lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
--- lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp (revision 270942)
+++ lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp (working copy)
@@ -164,7 +164,7 @@
// Look for register defs and register masks. Register masks are
// typically on calls and they clobber everything not in the mask.
for (const MachineOperand &MO : MI.operands()) {
- if (MO.isReg() && MO.isDef() && MO.getReg()) {
+ if (MO.isReg() && MO.isDef() && TargetRegisterInfo::isPhysicalRegister(MO.getReg())) {
You can’t perform that action at this time.