GNUmakefile example
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
[ | |
"ed1d0e1f743a7d19aa2dfb0162df73bacdbc699f67cc55bb91a98c35f7deac69", | |
"fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f", | |
"e668a111aa647e63ef587c17fb0e2513d5c2859cd8d389563c7640ffea1fc216", | |
"1bbb8324577ac089607e45813bac499ebdab4621d029f8c02b2c82b4410fd3f4", | |
"51535ad9f0e13a810f73ea8829a79b3733bd1fffb767c4885990b02f59103a13", | |
"2508ed2c2ab3f6728a880fafbc0895a2afeacbb74eb69847255fb60564af0d85", | |
"3707f1efc7515524dce41d3bf50bfd9fdaed3494620b5f94fcf16d2766da4ec2", | |
"dbab9040bc1f0c436b0f92f517702498358edc1fde2c7884d0e1036c739d44f3", | |
"ad5aab5be883a571ea37b231cd996d37522e77d0f121cedfd6787b91d848268e", |
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
_ = ( | |
lambda: [ | |
_ | |
# Imports | |
for sys in [__import__('sys')] | |
for math in [__import__('math')] | |
# Helper functions | |
for sub in [lambda *vals: None] | |
for fun in [lambda *vals: vals[-1]] |
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
def compute(limit): | |
d = [1] + [0] * limit | |
primes = eulerlib.primes(limit) | |
mod = 10**9 | |
Fibonnaci_numbers = [2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368] | |
for p in primes: | |
for i in range(p,limit+1): | |
d[i] += (p*d[i-p] % mod) | |
Please also refer to Fabian Jahr's
excellent documentation
and video.
In this document, I'll cover only some of what his document does in slightly greater
detail, while trying not to duplicate too much, and focused on gdb
and Linux.
Video version of (most of) this document: https://vimeo.com/576956296/df0b66fbfc NOTE if you watch the video: Near the end, I had problems attaching to
Please see latest draft and conversation in the bips repository PR #1378
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
// Heavily based on ideas from https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_opt_fold.c | |
// The most fundamental deviation is that I eschew the big hash table and the lj_opt_fold() | |
// trampoline for direct tail calls. The biggest problem with a trampoline is that you lose | |
// the control flow context. Another problem is that there's too much short-term round-tripping | |
// of data through memory. It's also easier to do ad-hoc sharing between rules with my approach. | |
// From what I can tell, it also isn't possible to do general reassociation with LJ's fold engine | |
// since that requires non-tail recursion, so LJ does cases like (x + n1) + n2 => x + (n1 + n2) | |
// but not (x + n1) + (y + n2) => x + (y + (n1 + n2)) which is common in address generation. The | |
// code below has some not-so-obvious micro-optimizations for register passing and calling conventions, | |
// e.g. the unary_cse/binary_cse parameter order, the use of long fields in ValueRef. |