« first day (3163 days earlier)      last day (1792 days later) » 
00:00 - 14:0014:00 - 22:00

12:14 AM
I was assaulted by a door handle :( ow
 
12:54 AM
recbg
Ow.. forgot to cbg an hour or so ago.
 
1:31 AM
@AndrasDeak I played that game so much as a kid.
 
2:12 AM
As far as DOS games go, gotta hand it to Dangerous Dave
first played that when I was 3, I've only beaten the game twice
 
I remember when I had the energy to play games. Now I get pretty tired and pretty much just watch other people play games lol.
 
what, playthroughs?
 
I watch a lot of hearthstone lol.
also I watch a a lot of melee
mostly just matches haha.
also watch a lot of tournaments.
I also occasionally watch some speedruns
not exactly a play through, but I loved watching the videos by Summoning Salt
the stuff that speed runners come up with is nuts.
(reminder to self: Some day, get better at reverse engineering stuff)
 
2:42 AM
rbrb
 
 
3 hours later…
@cs95 1st one already has 2 reopen votes, perhaps from the two answerers
 
collateral damage is always on the cards with off topic questions
 
6:23 AM
The only reasonable part of the question was "Where was this term first used?" which neither answered
 
6:40 AM
I could have sworn there was a HNQ about the walrus operator
Actually, not a HNQ but something with multiple upvotes on two answers and photos of walruses in the thread, only a few weeks ago. I can't find it now, I guess that got shut down too.
 
that one probably
 
Ooh ok, I can't see deleted posts. Yeah, that makes perfect sense
 
> You could parse it as YAML (a more lax version of JSON)
 
@DeveshKumarSingh I was actually pretty surprised to see that the YAML method worked
 
6:51 AM
@Arne from here. that's not true, is it?
@roganjosh hah, same thought.
 
It is, I had to test it myself
The output goes through jsonlint just fine
 
I trust that it works, but that particular statement is not true, right?
 
I want to say no, but I don't like the surprise that I've just had so I'm not feeling particularly confident on assertions
 
it's actually overkill of the nth dimension
 
It is a superset of JSON but I'm trying to work out what exactly is making it "more lax" in this case
Mmm, this has been known since 2012 apparently
 
6:58 AM
but will it treat other malformed json? which might come from the source mentioned in the question? I don't think so, hence the comment by deceze to fix the source makes the most sense
 
I won't argue fixing the source, I'm just trying to work out why YAML should accept invalid JSON. It's not clear to me why YAML actually can handle the trailing comma
 
tried the json with comma at json2yaml.com and it complains, so seems it's the property of pyyaml
 
@roganjosh because it's not interpreted as json, it's interpreted as yaml's inline style, which "happens" to be almost identical to json
and I think it does accept all valid json, plus some more.
 
Well python also allows trailing spaces...maybe there's a connection
 
It should accept all valid JSON. But why does YAML need support for the trailing comma?
 
7:03 AM
> You last voted on this answer 15 mins ago. Your vote is now locked in unless this answer is edited.
TIL
 
@AndrasDeak *trailing commas...
 
I suppose Python won't complain about the comma in sequences, and probably other languages too, so I guess it's more universal to accept it. Maybe the reverse question is better; why doesn't JSON allow it?
 
@roganjosh wanna ask on SO? =D
 
I think I'll keep it rhetorical :P
Though, for my own curiosity, I do need to see how JS responds to it in an array
 
it gives back an array itself
In [27]: yaml.load(StringIO("['a','b']"))
Out[27]: ['a', 'b']
 
7:15 AM
<script>
var something = [1, 2, 3,];
console.log(something);
</script>
JS doesn't care, the trailing comma is removed
 
In [28]: import json
    ...: dct =  { "a" : { "b":"c", }, }

In [29]: json.dumps(dct)
Out[29]: '{"a": {"b": "c"}}'

In [30]: json.loads(json.dumps(dct))
Out[30]: {'a': {'b': 'c'}}
even json module works with trailing commas, or is this not the right example?
In [33]: dct =  { "a" : { "b":"c", }, }

In [34]: dct
Out[34]: {'a': {'b': 'c'}}
guess trailing commas are removed by python too
 
This doesn't really add up
JS is happy with console.log(JSON.parse('{"a": {"b": "c"}}')); but console.log(JSON.parse("[1, 2, 3,]")); is not allowed
 
this explains on it more in terms of python
 
But it's not really to do with Python, it's JSON, which comes from JS
 
ohh yes, JSON is javascript object notation
 
7:25 AM
I messed up my example by making it parse your JSON output, so I could be making completely false claims. I shouldn't try experimenting with anything until I've had a cup of tea in the morning; I'm a liability otherwise
 
yes, time to have that earl grey
 
Trailing commas are not allowed in dictionaries either in JSON. Your example is flawed because dct = { "a" : { "b":"c", }, } allows Python to remove the superfluous trailing commas before serialization. So the json module is properly consistent with JS. None of this explains why it's invalid JSON but valid YAML, but I'll investigate that on a slow-news day
 
@roganjosh yes I added a disclaimer "or is this not the right example" in my post
 
I remembered another old riddle:
# Create a class with an attribute that doesn't show up in the __dict__
# without using properties or __setattr__.

class ValidatorMeta(type):
    def __new__(mcs, name, bases, attrs):
        assert 'x' not in attrs, "Using properties isn't allowed"
        assert '__setattr__' not in attrs, "Using __setattr__ isn't allowed"
        return super().__new__(mcs, name, bases, attrs)

class SomeClass(metaclass=ValidatorMeta):
    ...  # YOUR CODE HERE

obj = SomeClass()
obj.x = 3
obj.y = 5
assert vars(obj) == {'y': 5}
 
7:42 AM
__slots__ would sort of do it, but only because the validator checks too early to see the slot descriptor.
 
:/
spoilers!
 
Oh. Was that supposed to be the solution? I was hoping there would be a solution without a "cheat" descriptor.
 
Sorry to disappoint. I know it's pretty dumb for the intended solution to create descriptors, but I couldn't find a way to phrase the prompt more accurately without pretty much giving away the solution
 
Sorry.
I have another solution that's even cheatier. Not sure how to post it - I don't think spoiler markup is available in chat.
 
Spoiler via sopython and userscript
May 7 at 18:20, by Kevin
AFAIK https://sopython.com/wiki/Userscripts has an up-to-date link to the soChatSpoilerAdd.user.js userscript, if anyone can't be bothered to create spoilers manually.
Or just link a pastebin or something
 
7:55 AM
Does nonlocal keyword makes python search only in the enclosing scope, and does not look in the global scope?
x = 'global x'

def outer():

    global x
    def inner():
        nonlocal x
        print(x)
    inner()

outer()
 
Try and see
 
I tried, and it throws an error, no binding for nonlocal 'x' found
 
Does that not answer your question?
 
I though that the nonlocal can refer to the global scope of x if I define global x in the outer funtion, but doesn't seem to work. why might that be
 
Because global x doesn't bind a name
try x = x instead :P
 
7:57 AM
I think I need to restart my browser. Some kinds of buttons and links aren't working, including the "Encode" button on the sopython spoiler page.
 
The sopython page is broken...hence need for userscript
 
the spoiler page is b0rked
Apparently Kevin's userscript doesn't do line breaks... kinda useless for code
 
Huh. Well, other pages besides that one are also failing for me, so I think there's also a problem on my end.
 
@Kevin ^ the users are growing restless
 
@AndrasDeak aah okay, so it just refers to the variable in the global scope so we can refer to it or modify it, same as nonlocal refers to the variable in the enclosing scope
 
7:59 AM
@user2357112 That'll be a riddle for another day (:
 
8:17 AM
Turns out Kevin's script can do multiple lines if you type your text into the chat box and select it before pressing the "spoiler" button
 
user10984358
8:37 AM
heya
 
user10984358
trying to use my integrated webcam using the opencv functions but I am faced with this error
 
user10984358
cap = cv2.VideoCapture(0)
if (cap.isOpened()== False):
  print("Error opening video  file")
while(cap.isOpened()):
  ret, frame = cap.read()
  if ret == True:
    cv2.imshow('Frame', frame)
    if cv2.waitKey(25) & 0xFF == ord('q'):
      break
  else:
    break
cap.release()
cv2.destroyAllWindows()
 
user10984358
thats the code I am using
 
user10984358
I get the following on building
 
user10984358
[Finished in 0.5s with exit code -6]
 
8:51 AM
"building" means "executing"?
If so, there must be more output than that
 
Hi everyone, I think I have a problem with PyCharm. Indeed, every time I open it, it says "Connecting to the console"(as a background task). I still can run full scripts but I can not run a part of a script (let's say a cell for instance). Have you ever faced this problem?
Side question: Why PyCharm is so appreciated? I find Spyder much more convenient and intuitive
 
Spyder is more angled towards data processing, so it's probably more cumbersome than PyCharm for big packages. Then again, I haven't used PyCharm all that much
 
@roganjosh I don't really get what you mean, sorry. In which cases PyCharm performs better than Spyder? Or more basically, what PyCharm can do that Spyder can not?
 
In terms of developing your own software packages, PyCharm probably handles that more intuitively with the navigation panel and actually structuring the project with dependencies. Spyder basically has single scripts. I use Spyder and have built big projects with it, I'm just saying that the way it works probably isn't as intuitive for people working in software development.
Also, tab completion is broken on my version at home and they seem to just keep pushing the issue back to the next major release. That's a bug but it sure is annoying and lots of people have it :/
 
9:09 AM
Thank you for your explanation. Super clear
As a data scientist, I don't see the point of using PyCharm. Especially if you know R, cause Spyder is really similar to R IDE (RStudio)
 
The point about tab completion was mostly irrelevant, it's just that I'm working without it today and getting frustrated :P
 
Anyway, I still have my problemwith PyCharm, haha
@roganjosh Totally understand that :)
 
@Mez13 Spyder was specifically tailored to your field. It's natural that you'd find it more appropriate :)
It also takes inspiration from MATLAB in regards to the global namespace
 
hi
 
hello
 
9:15 AM
which one is more accurate, creating a Timer object, or using the whole code in timeit.timeit straight?
is there a benefit to one over the other??
 
@Moytaba The source code states that timeit is a convenience function
 
@roganjosh oh, thank you, how do I check the source code?
 
I was going through the documentation and it didn't really make it clear what the Timer class was for
By clicking the link I just gave you :)
 
@roganjosh oh, thank you
 
stackoverflow.com/questions/56594839/… Unclear what is being asked, even after asking clarifications from OP
 
9:28 AM
I don't really know why the docs don't mention that it's a convenience function. It certainly wasn't obvious to me reading that why both should exist
Although, what is the purpose of _globals = globals in there?
 
exactly I was wondering that.
 
I don't follow what global_ns = _globals() if globals is None else globals does
 
Because there's a bunch of functions that have a parameter with the name globals, so they're using _globals to access the builtin
 
Is that good practice? I guess it makes sense to mentally parse having globals as a name parameter to the function, but would it not be better to have _globals as the argument name?
 
*shrug* The stdlib often makes these kinds of sacrifices for the sake of a nice interface
 
9:38 AM
.. versionchanged:: 3.5
The optional *globals* parameter was added.
 
Whether that's a good thing or not is debatable
 
eval also takes globals and locals as parameters
 
user7074788
Hi Everyone,
I using a while in python which runs for 2 hours and stopps automatically without any reasy given
 
user7074788
how to extend this time to "infinity"
 
You haven't shown the actual loop. while True: would run to infinity, as long as you don't have some break or other exit like return if it's in a function, etc.
@MisterMiyagi They also have to account for that with exec(code, global_ns, local_ns) in case globals is re-bound to something else.
 
9:47 AM
Which version would you guys prefer for an object that updates its own state with outside information:
async for a, b in updates:
    self.a, self.b = a, b

async for self.a, self.b in updates:
    pass
 
The first version for sure.
 
first, be a long shot. I always felt that mutating objects by putting them as loop-vars was spooky
 
Well, I tried pretty hard to bend "spooky action at a distance" to get the physics vibe. But, my pun game is weak today
 
@Moytaba I normally use a Timer object. Eg, stackoverflow.com/a/35451912/4014959
 
@roganjosh it's observing the thought that counts
 
9:54 AM
Well, at least my attempt hasn't collapsed to nothing
 
@PM2Ring 0/
 
10:08 AM
in Python, can we call functions that have keyworded arguments without specifying the keys and just by relying on the order in the definition? E.g in the timer.timeit(...) function, I don't write stmt='...' and setup='...' but it still works.
 
In the code I linked to you, you can see that the keyword arguments all have default values
def some_func(a=None, b=None):
    print(a)
    print(b)

some_func(9, 8)
That shows that keyword arguments can still be treated as positional arguments
You can get rid of the 8 in the function call and it will still work, but b will be None
 
@Moytaba What roganjosh said. Recent versions of Python 3 allow keyword-only args, though. With timeit, I advise using the keywords so you don't accidentally mix up the setup & stmt args.
 
thank you both
 
Was there a strict reason that we couldn't have keyword-only arguments before, or just a design limitation by oversight?
That question is too vague, probably. I don't suppose there was a strict philosophy for why you couldn't have it originally that somehow changed
 
huh, i didn't even know about keyword only args
 
10:23 AM
whelp, someone suggested I delete my answer in one of the question, since linter would complain, when I said I wanted to keep mine, they downvoted the answer lol
The reason I didn't correct my answer was then it would end up same as another answer, what would be a right approach to do here
 
@roganjosh Not sure. My guess is that Guido didn't think they were necessary.
@DeveshKumarSingh If you can't fix your answer without turning it into a clone of another answer, then it's probably a good idea to delete it. Unless you can figure out a way to cover useful relevant stuff that the other answer doesn't cover adequately.
 
@ParitoshSingh python-3-for-scientists.readthedocs.io/en/latest/… its syntax is strange to me as a non-expert :D
 
thanks, yeah it makes sense once you start from the PEP version of it here
 
@PM2Ring considering the prevalence of dictionaries in CPython, it seems almost idiomatic to require them :)
 
@PM2Ring you are correct, but is that necessary to make sure the code you write pass through a linter, or is it just considered a good approach
 
10:30 AM
The idea being, an intermediate step was def compare(a, b, *ignore, key=None): which still allowed random positional args to be captured. Then the next step was just removing the step that allowed the extra positional args to be captured.
 
I don't buy linter tantrums as a reason on its own to merit deletion. In this case, though, the two answers basically say the same thing, and one doesn't cause linter issues
 
@DeveshKumarSingh I don't use a linter with Python. And linters can complain about stuff that's not worth bothering about. OTOH, in a large codebase, using a linter is a good idea, especially when multiple people are contributing code.
 
@PM2Ring I was forced to use linter a few months ago since the codebase I am commiting to has a jenkins server which runs a linter job, and the code is not commited if it doesn't pass the linter :(
Guess that's one way to force people to format the code
 
10:52 AM
If anyone's good with CSS, I need help figuring out how to vertically center text in an ::after element: jsfiddle.net/ganu3m7v
 
✝_(º_º)
 
Hey, I worked hard on that CSS code! Don't you dare purify/banish/exorcise it!
 
CSS is my bane. Stay back!
 
try/except inside css, now that's a first
 
You better not visit the riddles page, then :P
 
10:58 AM
@Aran-Fey perhaps ask on SO and see how many downvotes do u get in a minute :P
 
yeah, I probably will
I tried the CSS chat room, but it's pretty dead
 
... hence the exorcism
 
although I didn't get what problem you are having in the css, the rendered page looks great to me
 
the "hover to reveal solution" text is glued to the top, I want it to be centered
 
mind if I give it a try?
 
11:04 AM
go wild
 
it sort of got fixed with line-height: 750%;
 
problem is, not all solutions have the same height
so hard-coding doesn't work
 
you are right
 
11:39 AM
cbg
 
cbg
I was curious about why you're recruiting for PSF reviewers. Maybe I've forgotten but do you have a specific role in PSF or just using your mod influence and charm to help out?
(on the hunch you might get sausage rolls in return, obviously)
 
cbg
 
the one true currency
 
for a bit
 
@Arne The gold bars in Fort Knox are just well-cooked sausage rolls. It's the perspective that makes them look more like bricks
That's the etymology of "golden pastry"
 
11:46 AM
now I'm hungry again
 
@roganjosh I'm the Chair of the PSF Jobs Board Working Group
 
I've just had a tasty meal of tinned chilli. It was only 3/4 as bad as I anticipated. All thanks to my fridge compressor deciding its time was up 2 days ago :/
 
@JonClements how much of a time investment would that be, roughly? I could do a couple of hours next week, if you still need people
 
@JonClements hi Jon, had a question about a job posting I reviewed yesterday, have asked you a question privately
 
12:05 PM
@Arne umm... the working group mission statement says 5 hours/mth, but realistically, that's not needed... there's only a few posts a day, so obviously good posts can be approved at a glance and with a single click, adding feedback to why a post isn't suitable might take 2/3 minutes each.
@DeveshKumarSingh errr... where should I be looking for that?
 
Poll: if a in (b, c, d):? Or if a in {b, c, d}:?
 
doesn't matter, either one's fine
 
I lean tuple-wards on this one
 
@Kevin hmm maybe the second one since i remember it was faster...
Not sure, but probably
 
membership testing on a tuple with 2/3 elements is faster than a set iirc
 
12:15 PM
But in reality any one of them is fine for me and many others
@JonClements Yeah, i remembered i timed it and set won
 
@JonClements the group i created yesterday between us
 
Sets are about twice as fast on my machine but I don't trust this potato to be representative of anything
 
it probably also depends on whether the elements are literals or not
 
And set is preferred as per what Martijn said
 
12:18 PM
@Kevin Even for a set that small?
 
TLDR: "the best option when using Python 3.2 and up, is to use a set literal". Good enough for me.
 
@PM2Ring Yeah. Specifically, I tested "x" in {"a", "b", "c"}:.
 
Interesting. But I bet the tuple literal uses less RAM. ;)
 
Then I tested "b" in {"a", "b", "c"} to see if a successful membership test had different metrics. Sets still won, but only by like 10%
 
12:21 PM
@Kevin Haha you should test with:
set(range(100000))
Or larger
i guess...
 
I expect membership testing to be even better for larger sets, since it's O(1)ish compared to tuple's O(N)
 
rbrb when the crowd comes...
 
@JonClements I'm not gonna commit just yet as I'm just now myself looking for other jobs (though, perhaps that would be the ideal place to be <shrug>) but in principle I would be happy to help. If you're still looking in a couple of weeks, I will join.
 
recbg
 
cbg
 
12:24 PM
@Kevin I definitely agree with that. But I'm curious about the speed for a small tuple vs set when it's not a literal, so it can't use the trick of building a frozenset at compile time.
 
@roganjosh of course... thanks for consideration though - really appreciated :)
@U9-Forward oh wow... I also commented on that post... I knew Martijn would have written something decent (when the heck doesn't he) about that :p
 
Sure. The process doesn't look too taxing and it'd be nice to have some involvement in PSF so I will definitely ping you about it, I'm not just diverting from it.
 
I guess a general rule of thumb is that if you're not sure about some Python internals - look at Martijn's posts :)
3
@roganjosh priorities first mate and all that... just let me know in your own time - no pressure
 
@PM2Ring Here are some more of my tests. pastebin.com/QwBxkmU3. Sets win even without the frozenset optimization.
 
I'm currently trying to figure out how to do a unit test based on a Martijn answer; it's so far eluding me
 
12:32 PM
I thought about including a test where the set object is constructed within the function, but not using literal syntax, but I feel like that would get swamped by name lookups when I call .add three times
and set(("a", "b", "c")) I don't feel inclined to test since instantiating it is obviously going to be slower than just ("a", "b", "c")
 
set({'a', 'b', 'c'})
 
Oops, there's a typo in half of my tests. Revision incoming.
 
cbg
 
{'a'} + {'b'} + {'c'}
cbg
 
@AndrasDeak Ok, I'll test that: failed_lookup_on_locally_created_nonliteral_set: 1.7948407520000003 and successful_lookup_on_locally_created_nonliteral_set: 1.8058898450000012
That's the worst results among all approaches I've tried.
 
12:37 PM
I guess it's not that surprising; the second one was a more serious suggestion
It spares a namespace lookup, doesn't it?
 
Ok, but what about sets like {a, b, c} ? Those have to be constructed at run time.
 
Can somebody help me with a regex prob : I am trying to find a word between US and an underscore , currently got this far r'(?:US)(?:_|»)(\D+)' , now I dont know how to make the regex stop as soon as it finds an underscore
 
@PM2Ring good idea
 
I'll test {'a'} + {'b'} + {'c'} once I figure out what the real operator is that you're supposed to use to combine sets. Was it... |?
 
oops, yeah, |, sorry
@anky_91 <US lookbehind>[^_]*<underscore lookahead> perhaps
 
12:40 PM
your sentence and your regex don't match
 
that too, but it's too hot here to worry about stuff like that
 
@anky_91 Anything wrong with US[^_]*?
 
you're trying to find things between a US and an _ or stuff after the underscore?
 
also »
 
@AndrasDeak oh, what's the weather like over there?
 
12:41 PM
@anky_91 It would help if you show us a few sample strings, with the desired output.
 
@ParitoshSingh *puddle of human tissue*
 
the weather is not cloudy enough
 
ouch, that bad huh :P
 
Well, not by Indian standards ;) Only 32 degrees.
 
well, pretty relatable i can say.
 
12:42 PM
okay trying that, the string is something like abc_US_string_something , sometimes abc»US»string»something
trying to get the string part of the string
 
(?:<=US[_»])[^_»]*
 
US([»_])[^»_]\1 perhaps
Aran's order is better, it looks like a winking axolotl
 
hahaha
 
@AndrasDeak ha ha okay lol. :D
 
@AndrasDeak it looks more angry to me
 
12:46 PM
only if you imagine it twitching
 
Regexolotl used Splash. It's not very effective.
 
@anky_91 Is it ok if the regex also matches "string" in "xyzUS»string_something" ?
 
@Kevin how about skipping global name lookup with the local name binding trick?
 
» this character is the delimiter in 1 row, and _ is the other one in the other, i can replace » with _ and get the job done, however just practising, dont know how to make that regex stop when it finds an underscore
:)
 
12:49 PM
 
awww, too late :D
 
hahaha
 
@Aran-Fey not working for me, perhaps I have something else in the data let me have a look
 
9 mins ago, by PM 2Ring
@anky_91 It would help if you show us a few sample strings, with the desired output.
actual input, actual code, actual output please
 
sure 1 min
 
12:51 PM
Also, regex101 is a great resource when you wish to practice regex stuff
this would work though i presume. (?:US[_»])([^_»]+) Aran had <= in his regex at the start that probably threw things off.
 
@ParitoshSingh that worked
 
I'm pretty sure there's a way to exclude the xyzUS»string_something failure case that PM noted, but maybe we should try to actually establish a test suite first
 
PM 2Ring asked an important question though. say even if you don't have a string in the format, the trick is to consider whether you wanted to match something sandwiched between different symbols or not
 
let me decode this, I am horrible @regex
 
@regex is a very understanding user
 
12:53 PM
laurel. poor regex.
 
Ha ha
 
Aran's suggestion assumes that >>string_ is fine, mine tries to match matching delimiters
 
play around. regex101 is a lifesaver
 
Thanks for that @ParitoshSingh
@ParitoshSingh yeah the seperators are either _ or >> cant be both
 
12:59 PM
\number is good for matching the separator character that you already matched, although I'm not sure whether it can refer to a group inside noncapturing parens, and I'm not sure you can put a ^ in front of it to negate it
 
the point is to have a capturing group
and you want to match the other delimiter instead
18 mins ago, by Andras Deak
US([»_])[^»_]\1 perhaps
 
I think that fails if xyzUS»abc_xyz»something is supposed to match "abc_xyz"... Or does it?
 
indeed it does
 
You need US([»_])[anything other than the delimiter that was matched]+\1
 
1:04 PM
which means just two regex attempts from outside with either delimiter ¯\_(ツ)_/¯
 
Lazy solution that I didn't bother to test: (US»[^»]+»)|(US_[^_]+_)
 
Honestly. Now 2 upvotes on the typo answer that I scrambled to close. WTF. The whole thing played out in 2 minutes.
 
It's always best to learn regex well before you need it, and then try to avoid using it even when you obviously need it. Practice with grep or make a Python tool that uses Python's regex... hmm, that a good idea for an assignment...
 
@AaronHall I agree, i had solved it using replace and split
however for learning i thought i will try the regex
:)
 
"But Kevin, what if I don't want to match the entire pattern including the US and the delimiters, but only want the content inside the delimiters?". I'mma stop you right there:
18 mins ago, by Kevin
user image
Alright fine, twist my arm why dontcha. pastebin.com/AkZeRgYF
s = next(g for g in [m.group(2), m.group(4)] if g) is a truly hideous way to say "just get whichever group isn't empty" so if there is a way to do this with exactly one capturing group, I'm all ears
 
1:15 PM
\o cbg
 
Maybe something with negative lookahead...
 
cbg Mooing
 
Ok, now I'm done. pastebin.com/GwFkkqTq
@Aran-Fey Yeah, that should work. I can't think of a case where lineno and col_offset don't uniquely identify a token, so that's an effective key.
 
<polygraph twitching noises in the background>
 
@PM2Ring Sorry I missed that. :) strings are ` Desktop Mobile Tablet_US_Johnny_N/A` and Desktop»US»Smirnoff»N/A» , (?:USÂ?[»])([^»]+) this works tough.
Found this cool link in SO: stackoverflow.com/questions/22937618/…
 
1:27 PM
The pattern (?:USÂ?[»_])([^»_]+) incorrectly matches the string "US»string_something", but if you're OK with that, then I guess it's fine.
 
@AndrasDeak Fourier fun and Borwein integrals, with John Baez and Greg Egan. johncarlosbaez.wordpress.com/2018/09/20/…
 
I think I have seen something very similar, thanks :)
 
@Kevin aha, i get you, you mean for 2 separators in 1 row
 
If it turns out that is a problem, I already gave a solution in my most recent pastebin
 
@Kevin cant access that link. :( restricted
 
1:30 PM
which happens to be linked from the blog post, good
 
TLDR for the restricted: US([»_])((?!\1).+)\1
 
@AndrasDeak No worries. :) I think it's cool that the scifi author is explaining maths to the mathematical physicist. Of course, they've been friends for a while.
 
found it here
 
@Kevin thanks for that.
rbrb
 
morning cbg
 
1:39 PM
@AndrasDeak Ah, ok. That must've been during one of my breaks from SO. Or my memory is getting worse than I thought. :)
 
yeah, I think so :)
I vaguely remember that you had little overlap with abarnert during that time
 
Just saw a question on the main site with the title "How to submit a spark job with zip having main.py" and I thought it was asking about whether Python sparks joy or not
I hope Marie Kondo never sees my directory of neglected half-finished projects
 
well they all spark joy for you so they're safe
 
They each spark about 1 milliCringe actually. (Cringe being the SI unit equal to one memory of that embarassing thing you did in fifth grade)
 
SI units defined in terms of school "grade" and not "year". Does not compute.
 
1:47 PM
@Kevin that reminds me I saw this joke yesterday
 
Cringe being the SI unit equal to one memory of realising it should be defined in terms of "second" not "year"
 
"in classe de septième"
It's tricky to translate grade and/or year into seconds, since the time between birth and your first day of fifth grade will vary by a year or more between individuals.
 
I can imagine a school boy/girl trapped in time at whatever place they keep the items that represent standard units of measure. Kept there in a perpetual cringe state.
 
Exactly at the moment they farted and the unfortunate curvature of the wooden seat amplified the noise tenfold
 
@Kevin sounds like we need an SI individual, then
 
1:52 PM
Not to overengineer a highly hypothetical and weird thought experiment, but I think a key component of the cringe is the adult.
OK, the farty chair scenario is instantly cringey, but there can be more long-term sources for sustainable cringe
 
Insert reference here to that one scientist from like two hundred years ago that's considered the canonical specimen for modern humans because he was the one writing the book on canonical specimens and he decided "may as well be me, then"
 
like "that cool haircut I sported for three years"
 
recbg
 
My favourite Charlie Brooker character: Philomena Cunk
 
That guy is the SI individual. Don't know if he attended fifth grade though.
 
1:53 PM
what am i stepping into here?
ah, new unit today, i see.
 
There's a specific name for "the one specimen we collected that will be representative of a species as a whole by definition". Model specimen? Target specimen? canonical specimen? I'm getting zero relevant google hits.
 
@AndrasDeak How about that time in college when I was at a party. I tried to make conversation with a girl I liked and complimented her on her Adam's apple.
 
hehe
according to the internet there's also a seemingly endless source of "nooooo that person was actually into me!"
 
Yep.
Carl Linnaeus (; 23 May 1707 – 10 January 1778), also known after his ennoblement as Carl von Linné (Swedish pronunciation: [ˈkɑːɭ fɔn lɪˈneː] (listen)), was a Swedish botanist, physician, and zoologist who formalised binomial nomenclature, the modern system of naming organisms. He is known as the "father of modern taxonomy". Many of his writings were in Latin, and his name is rendered in Latin as Carolus Linnæus (after 1761 Carolus a Linné). Linnaeus was born in the countryside of Småland in southern Sweden. He received most of his higher education at Uppsala University and began giving lectures...
Behold, a man
 
Aaah you actually meant Linné
 
1:58 PM
> Linnaeus's remains comprise the type specimen for the species Homo sapiens following the International Code of Zoological Nomenclature, since the sole specimen that he is known to have examined was himself.
 
like a boss
 
that's both awesome and sad
 
examined with scientific rigor :P
 
00:00 - 14:0014:00 - 22:00

« first day (3163 days earlier)      last day (1792 days later) »