Skip to content

Instantly share code, notes, and snippets.

@khyperia
khyperia / AnyAndAll.cs
Created July 28, 2016 19:34
Any and All Puzzle Solution (over-complicated mode)
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace AnyAndAll
{
public class Program
{
public static void Main(string[] args)
@khyperia
khyperia / Makefile
Created October 9, 2017 05:23
Timing of Makefile vs. dotnet msbuild
# PROJECTS=$(shell find src -iname '*test*' -prune -o -name '*.csproj' -printf '%h ')
# TARGETS=$(addprefix Binaries/,$(addsuffix .dll,$(PROJECTS)))
#
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
.PHONY: all
# Do not delete "intermediate" files
.SECONDARY:
#all: $(TARGETS)
Conclusion:
functionFormalParametersAndBody does AST things. So do (most) callers of
functionDefinition. However, sandwiched between are functionDefinition,
trySyntaxParseInnerFunction, innerFunction, and innerFunctionForFunctionBox,
which are all handling of random state and object construction (the "second
pass"-style material we might want to factor out).
functionFormalParametersAndBody does actual tokenStream parse/consumption,
and mutates the AST passed in as an argument to add the parsed body.
@khyperia
khyperia / gist:c4f6503069bef9e5af97d222a9bfb9a8
Created January 25, 2019 03:44
log for localhost:8282/uber/accounts/
2019-01-24 19:40:07.383 PST [18895] LOG: statement: BEGIN
2019-01-24 19:40:07.384 PST [18895] LOG: statement: SELECT admin_account.id AS admin_account_id, admin_account.attendee_id AS admin_account_attendee_id, admin_account.hashed AS admin_account_hashed, admin_account.access AS admin_account_access
FROM admin_account
WHERE admin_account.id = '7b673777-0442-44c9-a43c-870c51d219e4'::uuid
2019-01-24 19:40:07.386 PST [18895] LOG: statement: COMMIT
2019-01-24 19:40:07.394 PST [18894] LOG: statement: BEGIN
2019-01-24 19:40:07.394 PST [18894] LOG: statement: SELECT attendee.id AS attendee_id, CASE WHEN (attendee.first_name IS NULL OR attendee.first_name = '') THEN 'zzz' ELSE lower(attendee.last_name || ', ' || attendee.first_name) END AS last_first, attendee.badge_type AS attendee_badge_type, attendee.badge_num AS attendee_badge_num
FROM attendee
WHERE attendee.first_name != ''
2019-01-24 19:40:07.411 PST [18894] LOG: statement: SELECT admin_account.id AS admin_account_id, adm
js> dis(class c{x=2;})
flags: CONSTRUCTOR
loc op
----- --
00000: functionthis # THIS
00001: setlocal 0 # THIS
00005: pop #
main:
00006: getgname ".initializers" # .initializers
00011: zero # .initializers 0
@khyperia
khyperia / super.js
Last active June 25, 2019 15:50
Super calls in computed field keys
class C extends B {
field = 2;
constructor() {
class D {
[super()];
}
}
}
// ---
// prints 1, 2, 3, 4
function f(x) {
console.log(x);
}
class C {
static [f(1)] = f(3);
static [f(2)] = f(4);
}
class B {
constructor(x) {
console.log(x);
}
}
class C extends B {
}
new C("C"); // prints "C"
diff --git a/moz.configure b/moz.configure
index 2484ad553645..b15ef790e420 100755
--- a/moz.configure
+++ b/moz.configure
@@ -645,14 +645,14 @@ def config_status_deps(build_env, build_project):
topsrcdir = build_env.topsrcdir
topobjdir = build_env.topobjdir
- if not build_env.topobjdir.endswith('js/src'):
+ if 'js/src' not in build_env.topobjdir:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[user]
email = khyperia@mozilla.com
name = Ashley Hauck
[commit]
gpgsign = false