Skip to content

Instantly share code, notes, and snippets.

View chenzx's full-sized avatar
🎯
Focusing

Chen Zhixiang chenzx

🎯
Focusing
  • Shanghai, China
View GitHub Profile
@johnynek
johnynek / y.py
Last active March 3, 2019 16:21
Here is a port of this example y-combinator code: https://rosettacode.org/wiki/Y_combinator#Python except manually rewriting the lambdas into top-level functions accessing dictionaries to create closures.
def make_lambda(captured, fn, arity):
return {
"cap": captured,
"fn": fn,
"arity": arity,
"applied": [],
}
def apply_lambda(lam, arg):
app0 = lam["applied"]
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 return ret;
(rr) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007f2e1be7a5b9 in __GI_abort () at abort.c:79
#2 0x00007f2e1be7a491 in __assert_fail_base (fmt=0x7f2e1bfdd048 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=0x7f2e1cb2be68 "!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global"...,
file=0x7f2e1cb2be5a "lj_obj.h", line=926, function=<optimized out>) at assert.c:92
#3 0x00007f2e1be88612 in __GI___assert_fail (
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real