HNHacker News
TopNewBestAskShowJobs

jnetterf

237 karma · joined July 16, 2013

University of Waterloo SE 2017

https://nettek.ca

https://github.com/emilyskidsister

https://twitter.com/emilyskidsister

My side project: https://github.com/emilyskidsister/hacklily

jocelyn ~at~ nettek.ca

submissionscomments
jnetterf··on Inside the fall of BlackBerry (2013)
This is from September 2013.
jnetterf··on Hidden treasure in the D standard library
The standard library (Phobos) is open source. You can find the implementation of memoize at https://github.com/D-Programming-Language/phobos/blob/6cd2e4...

memoize is a template (http://dlang.org/template.html). In this case, a template is used to create a "version" of "memoize" with the right parameters and return value (i.e., `fn` and `memoize!fn` are the same type).

Each of these "versions" has a hash table from argument tuples to results. I believe the hash is computed by calling a toHash function for each item in the tuple.

Tuples and type tuples (http://dlang.org/tuple.html) in D are really quite powerful.

jnetterf··on Legal pot is a public health menace
Link to avoid paywall: http://www.google.com/url?q=http://online.wsj.com/articles/w...
jnetterf··on Why I can’t stop using Vim
"+p will paste the system clipboard.
← PreviousPage 2 of 2