Join me on Pownce!
Pownce is a great way to share messages, files, events, and links with your friends. Join today to start sending stuff!
-
Public Thought experiment: imagine you had a magical device, hooked up to a klaxon, that rang out before the market bubble burst. But, when it rang, you didn't know if the bubble would burst in 5 seconds, or in 3 months. It had some randomizer inside, and you didn't have access to know the setting.
There are some unknown number of such devices held by other investors. Maybe a ...
continue reading...3 hours ago Reply! Forward
-
Public Eff-bot trick of an "alternating" regex, for use with "findall", used this time for whitespace vs. non-whitespace
_re_whitespace_alternate = re.compile(r'[ \t\r\n]+|[^ \t\r\n]+')
__test__['_re_whitespace_alternate'] = r"""
>>> def f(s):
... return _re_whitespace_alternate.findall(s)
>>> f(' hello ')
[' ', 'hello', ' ']
>>> f(' \t hello hello \t ')
[' \t ', 'hello', ' ', 'hello', ' \t ']
"""
7 hours ago Reply! Forward
-
Public sentinel object trick, to avoid the tricky error of a mutable default argument
_default_skip_tags_sentinel = object()
_default_skip_tags = ['pre']
def elem_strip_all_text(
parent_e,
chars=" \r\n\t",
skip_tags=_default_skip_tags_sentinel,
grandparent_tag_hint=None,
):
...
if skip_tags is _default_skip_tags_sentinel:
skip_tags = _default_skip_tags
if skip_tags is None:
skip_tags = []
...8 hours ago Reply! Forward
-
Public "The Bipolar Lisp Programmer"
I am glad to read this (http://www.lambdassociate...), because along with this (Sherwin Nuland: A history of electroshock therapy (TED) http://blog.ted.com/2007/...) it reminds me how far I have left to go with my mental illness, and how far I have come.
I strongly believe, now, that a certain class of change takes 10 years to effect. 10 years is the upper ...
continue reading...1 day ago Reply! Forward
-
Public "The Bipolar Lisp Programmer"
I am glad to read this (http://www.lambdassociate...), because along with this (Sherwin Nuland: A history of electroshock therapy (TED) http://blog.ted.com/2007/...) it reminds me how far I have left to go with my mental illness, and how far I have come.
I strongly believe, now, that a certain class of change takes 10 years to effect. 10 years is the upper ...
continue reading...1 day ago Reply! Forward
-
Public One of these is the inability to finish things off properly. The phrase 'throw-away design' is absolutely made for the BBM and it comes from the Lisp community. Lisp allows you to just chuck things off so easily, and its easy to take this for granted. I saw this 10 years ago when looking for a GUI to my Lisp (Garnet had just gone West then). No problem, there were ...
continue reading...2 days ago Reply! Forward