« first day (146 days earlier)      last day (2300 days later) » 

12:14 PM
@Zanna I found the regex in the Launchpad source code, in stringformatter.py. It's part of a much longer regex, assigned to the variable _re_linkify, that is used to linkify a number of different kinds of text. _re_linkify is a big alternation (|) of subpatterns that capture text into named capture groups ((?P<name>pattern)).
See line 556 for the whole thing, but here's the subpattern for bug links:
      (?P<bug>
        \bbug(?:[\s=-]|<br\s*/>)*
            (?:(?:(?:\#|report|number|num\.?|no\.?)?(?:[\s=-]|<br\s*/>)+)|
            (?:(?:\s\#)?(?:[\s=-]|<br\s*/>)*))
        0*(?P<bugnum>\d+)
      )
 
thanks!
 
I found it helpful to visualize it on debuggex.com. Ideally one would select Python as the regex dialect and also select both the i and x flags, which correspond to re.IGNORECASE and re.VERBOSE, respectively. Unfortunately, a bug in deuggex.com causes it to believe that pattern has an unmatched parenthesis, when you tell it to use x. But if you use Python and i but not x, it will visualize what the regex is doing correctly, except that it will show spurious spaces.
But if you ignore the spaces it shows that are outside capture groups, then the visualization will be correct. :)
 
hahaha I appreciate the tips :)
 
This doesn't come from any knowledge I have that you don't have -- I just happened to try the site and have it strangely not work. When I used a different (non-visual) method of testing the regex, it did work, confirming that it's a bug in debuggex.com.
stringformatter.py also has a function called extract_bug_numbers, defined at line 181. That's actually totally separate from the kind of linkifications we've been talking about; instead, that linkifies bug numbers that appear in the format frequently used in change summaries (LP #...).
The Launchpad source code also contains human-readable documentation that describes what sorts of text get linkified to bug reports, which may be read in displaying-paragraphs-of-text.txt. See line 210 ("Bug references").
 
 
3 hours later…
3:00 PM
@Zanna btw, just curious hold cold it gets over there in England...... yesterday it was 24F, (-4C) where I live in the US, but a couple weeks back it was 10F! (-12C)
 
ouch...
UK has a maritime climate strongly influenced by the "gulf stream", an ocean current that carries warm air from the Caribbean to our region
 
ah yeah so that probably helps keep temps in check
 
As a result, our weather is changeable and wet, with mild wet winters and coolish summers (which are also quite wet - basically it rains a lot)
 
yeah so like Seattle
or Washington State
 
but overall the temperature here is unreasonably high for latitude. It was once pointed out to me that polar bears are living in North America at the same latitude Europeans are growing roses
Our summer temperature rarely breaks 30 degrees Celsius. And our winter temperatures rarely dip much below 0 degrees Celsius
but wet cold feels colder imho, and on those rare occasions when we get super cold temperatures of -10 or lower, it doesn't feel much colder to me than the usual 2 to minus 2 range haha
I really dislike cold weather. I'd prefer to live somewhere where I'm more likely to be too hot than too cold
I'm uncomfortably cold for at least 9 months of the year in this country
 
3:07 PM
so where I live on the east coast we tend to get ridiculous temp swings.... like on Monday it could be 30F and on Friday 70F
 
crazy!
 
granted that doesn't happen very often, but still
on a related note, I actually just learned one thing that makes the F scale look at least a little bit less silly than C: apparently 1 degree F is about the smallest temperature change a human can distinguish
unfortunately though I think we've gone too long with the imperial system to change to metric now :\
hmm I have another random question for you
how long is a typical metric-only ruler?
because metric doesn't have anything between a CM and meter
I mean technically there's decimeters but does anyone actually use that?
 
3:29 PM
30cm
15cm for small pencil case :)
I had a folding ruler at school :) But the seam in the middle where it unfolded mad a slight bump when drawing
 

« first day (146 days earlier)      last day (2300 days later) »