Skip to content

Instantly share code, notes, and snippets.

@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
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 / 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)
@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)