« first day (2162 days earlier)      last day (2803 days later) » 

5:00 PM
I will say that the questions, on worldbuilding, that involve AI/ML seem to suffer from the same thing that all questions asking about those subject run into - a lot of people who do not really understand what "intelligence" in regards to computers actually means
 
I would probably accept a REPL output but only if no other rules-lawyering occurred
 
Hm. Chat definitely doesn't have responsive design
 
Every design is responsive if you're high.
 
@AnttiHaapala oh, yeah, that's hilarious:D
 
I don't want to invoke Godwin's law on entry, but Hitler wasn't exactly an aryan himself
cabbage
 
The other day I wanted to play a mod of Minecraft that introduces additional challenges etc. I downloaded all the files but it wasn't obvious what I was supposed to do with them. Eventually I installed something called Curse, which is some kind of voice-over-ip collaboration tool that just happens to have a one-step Minecraft mod installation system for some reason. All was well, until the next time I rebooted and Curse opened by itself without ever asking me for permission to do so beforehand.
 
did you curse?
 
5:14 PM
Curse's mother must have told it that it was a very special boy every day of its life, because I've never before met a Ventrilo ripoff with enough self-esteem to assume that I wanted it to auto-startup.
 
I had a friend who would 'play' minecraft by creating giant boreholes. I never got the appeal.
 
@Kevin urgh yeah
 
There's a mod you can install to create enormous machines that create giant boreholes for you. They're called "chunk f***ers".
(A chunk is the unit of measurement for a vertical slice of world in Minecraft)
 
On Raspberry Pi you can just do it in Python
 
Curse is a package manage for game mods that auto-starts because it checks for updates (and the designers are assholes).
 
5:17 PM
boom, back on off topic
 
Anyway. Disabling the auto-startup was fairly straightforward, but AFAICT there's no uninstaller for Curse, so I guess it will just wrap its slimy invisible tentacles around my system forevermore.
 
Curse used to be fantastic, back in the early WoW days.
Then it got TERRIBLE.
 
Curse was... better than nothing. But it's always been kind of janky.
 
There used to be an uninstaller, does Add/Remove programs list it as an installed program?
 
I constantly forget that Add/Remove programs is a thing. I'll check tonight.
 
5:18 PM
I mean, it was fantastic compared to "Go to this outdated forum post and download this .zip and then remember to manually update it every Tuesday when WoW patches".
 
Better than nothing
 
Exactly.
 
There are at least two other mod managers for Minecraft which by my estimation are far better than Curse, but I can't use them because the mod owner decided to be curse-exclusive
 
print >> None, 'Hello world' ; 'dlrow olleH' ,enoN << tnirp
I am stuck here...
 
During Curse's development the developers chanted in Latin the whole time - this should concern no-one
 
5:20 PM
@AnttiHaapala through the looking-glass...
 
I'm surprised you can't reverse-engineer curse to steal their repos.
 
I want to exclude the other half without using that ^string escape trick
 
hmm...what do I format my microsdhc to
(rhetorical, googling)
 
Heh it's nearly turnip
 
@AndrasDeak vfat
 
5:21 PM
ź̧̡̺͇̬̗̞̮̮͙̰͍͙́á̸̡̡̡͇̬̠͖̩͖̼̼̺̞̗̟͇ĺ̨̥̝̬g̛̟͙͓̀̕o͏̝̤̩̯̣͟͢f̸̰̻͓̰̠̩̙̬̟̪̫̜͜͟͡s͏̬̹̱̕‌​͓̯̬̪͓͉̩̞̳̘ͅ
 
let me google that:D
vfat doesn't even exist
last google hit on the page :O
that's on the border of existence
 
fat that is
 
I have an enormous XML file that I only need a part of. There's no way of chopping down the feed that I retrieve before I retrieve it. My approach at the moment is - retrieve feed, parse it all, create the objects I want, and then discard the larger bit. Those things are all done in functions - will python garbage collection take care of memory once I'm out of the function that effectively discards the other stuff?
 
Just use FAT16!
 
5:24 PM
thank you, cat loving person
 
16KB should be enough for anyone.
 
@Withnail if there aren't any more references to the objects
make sure you close your file handles
 
and use something other than xml
 
it's over-the-wire xml
 
Make sure you don't keep parts of the etree around, because they reference each other.
 
5:25 PM
well yeah, welcome to the sports industry @AndrasDeak
 
You can use a streaming parser if memory is an issue.
 
FWIW I know theoretical chemists who use XML for their own enjoyment
 
wat.
 
nasty
 
5:26 PM
If I was dyslexic I would be a huge advocate of XML just to spread the pain.
 
XML is the worst.
 
I guess that could be like programmers who use befunge for their own enjoyment
 
what I know from XML comes from their XMLs, but it's enough for me to cringe on their behalf
 
Xml has its advantages
 
Anyhow, yes there are ways to make sure the mamory is cleaned up when you're done.
Unless you compare it to JSON
Or are in the 2% case that actually uses namespaces I suppose.
 
hehe
symmetric hello world:
(exit)('Hello world')('blɿow ollɘH')(Ɉixɘ)
5
 
eye twitches
 
<eye twitch> Right </eye twitch>
 
@AnttiHaapala Oh wow. That is something.
 
5:32 PM
@Antti what exactly is that you're doing? Besides making our eyes bleed?
 
Python 3.5.2 (default, Jul  5 2016, 12:43:10)
>>> (exit)('Hello world')('blɿow ollɘH')(Ɉixɘ)
Hello world
 
@AndrasDeak it exits before it can call the return value of the exit function, so A-OK
 
Aaaah, so it's valid Python. Never would've guessed that:D
 
also:
 
the other part is mostly amusing because it's reversed text
 
5:34 PM
@WayneWerner that part I got...
 
(exit)('Hello world!')(̈́'¡pๅɹoʍ oๅๅəH')(ʇıxə) - almost perfect 180 degree rotatable hello world
 
DSM
Wow. Would never have thought of that entire approach.
 
lol. Very nice.
 
comma instead of quote is invalid?
 
5:35 PM
"almost perfect" :P
 
yup, 'tis
 
hops, had a bug there: (exit)('Hello world!')('¡pๅɹoʍ oๅๅəH')(ʇıxə)
I thought my display was dirty but... there was '
 
wim
very good @AnttiHaapala . was it your idea in a moment of inspiration, or you found it elsewhere?
 
argh can't copy that silly character
@wim my idea, because I couldn't get the Python 2 print to work nicely :(
cannot really use parentheses without mirroring.
 
wim
I hadn't known about the argument to exit. Always just use ctrl+D
 
5:44 PM
it's also available for sys.exit
not sure if those are the same calls...
nope
 
cbg
 
Python 3.5.2 (default, Jun 28 2016, 08:46:01)
[GCC 6.1.1 20160602] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.exit is exit
False
 
unicode is a big pain for me
 
cabbage, @AvinashRaj
 
>>> import re
>>> s = 'Gutiérrez'
>>> n = 'GUTI[eé]RR[eé]Z'
>>> re.search(r'(?i)\b(?:' + n + r')\b',s)
>>>
 
wim
5:45 PM
sys.exit just raises a SystemExit afaik
 
wouldn't surprise me if exit does, too
 
in the site it works.. but not in code..
 
@WayneWerner there is no exit in builtins module
 
@AvinashRaj python3?
 
5:46 PM
no, python 2
 
Shame
 
matches in Python3.5
 
Heh
 
DSM
@davidism: somebody just wasted a whole line I typed..
 
5:48 PM
@davidism :-)
 
wim
@AvinashRaj use normalize
 
@AvinashRaj actually making them unicode literals works
which makes sense, TBH
 
Yeah, my best guess is some weird interaction of bytes vs unicode inside re.
 
@WayneWerner how? like unicode(n, 'utf-8') ?
 
DSM
Yeah, it should work if you use unicode literals across the board (which is the only 2/3 difference here which is relevant.)
 
5:50 PM
'Guti\xc3\xa9rrez' vs u'Guti\xe9rrez'
 
Better solution is to just use 3 all the time
 
@AvinashRaj no, by installing Python 3.
 
And if you really really can't do that
 
DSM
In [17]: import re
    ...: s = u'Gutiérrez'
    ...: n = u'GUTI[eé]RR[eé]Z'
    ...: result = re.search(u'(?i)\\b(?:' + n + u')\\b',s)
    ...:

In [18]: result
Out[18]: <_sre.SRE_Match at 0x3d86920>

In [19]: print(result.group())
Gutiérrez
 
Perfect timing
 
DSM
5:51 PM
But just work with 3. So many headaches with 2.
 
wim
@DSM you can combine raw with u prefix
>>> ur'\b'
u'\\b'
 
@DSM Not for python 2
 
DSM
@wim: been so long I wasn't sure!
@AvinashRaj:
 
@AvinashRaj no, that works just fine
 
DSM
In [21]: sys.version
Out[21]: '2.7.12 |Anaconda 4.0.0 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)]'
 
wim
5:52 PM
well now ur'sure' :)
 
>>> re.search(u'(?i)\\b(?:' + n + u')\\b',s)

Traceback (most recent call last):
  File "<pyshell#16>", line 1, in <module>
    re.search(u'(?i)\\b(?:' + n + u')\\b',s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)
>>> re.search(ur'(?i)\b(?:' + n + ur')\b',s)

Traceback (most recent call last):
  File "<pyshell#17>", line 1, in <module>
    re.search(ur'(?i)\b(?:' + n + ur')\b',s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)
 
DSM
@wim: :-P
 
@AvinashRaj did you make sure that n and s were also unicode literals?
 
DSM
^^ that's the error you'd get if n wasn't a unicode string.
 
usb 3.0 flash drives are greaaaaaat
 
5:55 PM
Strolling away whistling a jaunty tune
 
@wim only in python2
 
sure enough. Interesting.
because they did re-introduce u as a valid prefix (that's just a NOP) but I guess not ur
 
None works for me.
>>> n = u'GUTI[eé]RR[eé]Z'
>>> re.search(ur'(?i)\b(?:' + n + ur')\b',s)
>>> re.search(u'(?i)\\b(?:' + n + u')\\b',s)
>>> s = u'Gutiérrez'
>>> re.search(u'(?i)\\b(?:' + n + u')\\b',s)
>>> re.search(ur'(?i)\b(?:' + n + ur')\b',s)
>>>
>>> type(n)
<type 'unicode'>
>>> type(s)
<type 'unicode'>
>>>
 
hey all
do this room have a bot?
 
@WayneWerner ^^
 
5:58 PM
This room is all bots.
 
Python 2.7.12 (default, Jun 28 2016, 08:31:05)
[GCC 6.1.1 20160602] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> n = u'GUTI[eé]RR[eé]Z'
>>> s = u'Gutiérrez'
>>> re.search(u'(?i)\\b(?:' + n + u')\\b',s)
<_sre.SRE_Match object at 0x7fd6fe5007e8>
 
hey Wim
 
I'm a bot
 
I am a bot too
 
I'm just a very good bot
 
5:59 PM
Throws fifteen electrons to Wayne. Good bot!
 
Martijn was the initial bot. We've all been assimilated more recently.
 
@WayneWerner HOw in the world it's not working for me???
 
my Markov chains produce many good and some great answers
 
DSM
Speak for yourself. 100% analog over here.
 
Meatbag
 
6:00 PM
@AvinashRaj you're not using Pytohn
 
hehe ok
 
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "copyright", "credits" or "license()" for more information.
 
holy crap
 
File "<pyshell#17>", line 1, in <module>
 
2.7.6 I'm pretty sure reached EOL a few years ago
 
6:00 PM
what's that :P
 
@WayneWerner really?
 
@WayneWerner ubuntu 14.04 LTS has it:D
 
@AndrasDeak hey
 
@AndrasDeak ya, exactly.. i'm using 14.04
 
DSM
Speaking of my analog attributes, time for some calories. Rhubarb for all!
 
@ColdFire cbg
 
2014
That's when 2.7.8 was released
 
@AvinashRaj does locale from the terminal output a UTF8 value?
 
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> n = u'GUTI[eé]RR[eé]Z'
>>> s = u'Gutiérrez'
>>> re.search(u'(?i)\\b(?:' + n + u')\\b',s)
<_sre.SRE_Match object at 0x7f6d48421440>
 
there's a mistake in the starred Pythoneer story. factual should be factional
 
6:02 PM
that's what Wayne got on 2.7.12 mod memory address, right?
 
Yeah... probably locale encoding is not utf8
 
>>> import locale
>>> locale.getdefaultlocale()
('en_IN', 'ISO8859-1')
>>>
 
nice room full of bots
 
>>> locale.getdefaultlocale()
('en_US', 'UTF-8')
\o/
@AvinashRaj why is you locale latin-1?
 
6:04 PM
@AvinashRaj You're gonna wanna fix that
 
Germany?
 
wim
DSM is an analog bot
 
en_IN is Indian, no?
 
@AvinashRaj you don't have a utf8 locale configured properly, so implicit utf8 decoding will fail. Either configure your computer properly or decode explicitly.
 
@WayneWerner yes
 
6:05 PM
@WayneWerner it is, but I've only seen latin-1 in öü kinds of situations
clearly my experiences are limited in scope:)
 
@WayneWerner India_
 
I happen to know this because Hungarian őű is in latin2, which falls back to latin1 if something's crap
 
Davidism can i hire you for tutoring?
 
yes IN is india
 
lol
 
6:06 PM
@AnttiHaapala nice someones knows about India :)
 
@DavidGonzalez I currently don't offer tutoring. If you can ask a clear question with an MCVE I and others are happy to help you though.
 
wim
click, bots, you know you want to ...
 
@wim hey don't doxx me!
 
@wim that's a pretty good title
 
6:07 PM
@wim trololol
My bot schadenfreude routine has kicked into overdrive
 
@ColdFire I don't want to ruin your illusions, but India is a big-ass place, hard to not notice:P
 
I'll happy tutor for iro £35/hour.
 
wim
I found the asses much bigger in brazil
 
@AndrasDeak haha nice
 
@WayneWerner ya..
how to change the default locale?
 
6:11 PM
@wim lol
 
@AvinashRaj consider searching "ubuntu 14.04 locale": help.ubuntu.com/community/Locale
 
wim
@ColdFire if we speak in this secret code they can't understand us
 
I think the guys mean that you can't set it specifically for python:P
 
wim
shhhh!!
 
6:13 PM
@wim waffle scrooze *submit*
 
> creating Mechanical Turk job...
 
@wim nice i like it
 
@wim You think your pitiful captcha will thwart my OCR? Psh.
 
wim
waffle scrooze LOL
 
where did you get that from
 
6:14 PM
totally great name for a repo
 
hey dont take my name
 
that will be 1 bitcoin please
 
I only own about half a bitcoin :(
 
I used to have some Dogecoin
but some a-hole stole them all
 
OK I've found Kevin's palindrome challenge on the starboard, Antti's endeavours make much more sense now
 
6:18 PM
Haven't heard about the job, they said it'd be today. Can only assume I'm in the 'let's not deliver bad news before the weekend' bucket. :( Bah.
 
Is declining you on Friday the breaking up before Christmas of workforce?
 
or maybe they're waiting to give you the good news...
 
I believe so. I mean, mostly because that's what we always did.
 
every time I hear the words: "we'll let you know by Friday" I assume I will hear news on Tuesday
 
@WayneWerner maybe. Got to work on the assumption that if it was a yes, they'd give a quick 'we have to run because weekendz, lol, but let's job up, yeah'? I believe that's how millenials speak.
 
6:21 PM
its proven right so far (both good and bad)
 
If it was me I'd give the bad news before weekend, so you have time for looking on the weekend (and because I'm a sadist)
 
@Ffisegydd lol
 
Mostly the 2nd reason
 
if it was corporate: All bad news is delivered at end of day Friday so your not in the office the next day when/if they retaliate
 
I have set my locale file exists in etc/default to
LANG=en_IN.utf8
LANGUAGE="en_IN:en"
But still it shows ISO8*** instead of utf-8
 
6:25 PM
what's your output of localectl status?
 
I wouldn't read too much into it @Withnail
HR slows things down nearly everywhere
 
BUT ALL THINGS MUST BE ANALYSED AND OVERTHUNK
 
localectl
System Locale: LANG=en_IN.utf8
LANGUAGE=en_IN:en
VC Keymap: n/a
X11 Layout: us
X11 Model: pc105
 
20 mins ago, by davidism
@AvinashRaj you don't have a utf8 locale configured properly, so implicit utf8 decoding will fail. Either configure your computer properly or decode explicitly.
there's always the second or third options
 
decode explicitly means?
 
6:27 PM
'test'.decode('utf8')
 
of course if it were me, I'd just build and install python3
 
6:41 PM
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF-8')
>>> import re
>>> n = u'GUTI[eé]RR[eé]Z'
>>> s = u'Gutiérrez'
>>> re.search(u'(?i)\\b(?:' + n + u')\\b',s)
>>>
>>> re.search(ur'(?i)\b(?:' + n + ur')\b',s)
>>>
I'm gonna broke my pc.
 
ideone also returning None
 
github... reviews. FINALLY
 
GitLab is the best thing that ever happened to GitHub.
 
user559633
I wonder why he has that opinion. Reminds them they are a business that does a service in exchange for money and to quit navel-gazing?
 
6:54 PM
@AvinashRaj is there a reason you can't/don't want to use Python3?
 
@tristan real competition targeting the same space finally forced them to develop new stuff
 
@WayneWerner because i'm gonna use that part of regex in a python 2.7 package,.
 
user559633
Ah. Yeah, part of that was removal of "no managers" flat org stuff, I bet.
 
yeah. I used a tool years ago that was way better at code review than GH was until just now
 
@AvinashRaj and is there any reason you're not producing unicode strings explicitly, like you already asked me about and got an example of?
 
6:57 PM
code collaborator, I think
 
Phabricator is amazing if you're ok with not having the built-in network of users.
 
user559633
idk. i'm decently happy with GH. i give them money and they receive git pull/push reliably.
 
@AvinashRaj did you restart afterwards? Or reload locale stuff?
 
I can't get myself interested in installing GitLab when Bitbucket is free for my sized teams ;)
 
@tristan the biggest issue I have with PR comments is if you write "this is a bug that will explode our company" and that code changes, there's no way to not have that hidden
I think that will be different here
 
7:03 PM
I found this code on the web. So I am unsure! — Mona Jalal 2 mins ago
sigh cargo-cult programming - gotta love it
 
Hey, at least we know hell has frozen over: Kasra is telling someone to try it themselves.
 
@JGreenwell 3k rep nonetheless
 
user559633
ugh. okay. that's enough SO for 48 hours.
 
time to sleep?
do an fsck at least
will my phone work with an exfat microsd? (rhetorical, once again)
 
@AndrasDeak ^ getting kinda personal there ;)
 
7:07 PM
python has no privates
it's working! \o/
 
user559633
@AndrasDeak nah, time to be productive. SO is a net productivity killer for me by a very wide margin.
 
@tristan I thought that's a given:)
 
user559633
In any case. See y'all on Sunday :) Have a good day/night/etc.
 
except for people like Martijn who have a neural uplink
 
@davidism Whoa, I've never seen Kasra not spoon feed vampires.
 
7:08 PM
take care, @tristan:)
 
see ya @tristan have a nice weekend
 
Later, @tristan! Let me know when you're streaming.
 
and self answered
 
Seems like the Friday homework crowd has started asking questions
 
teh repz are here!
 
7:13 PM
@davidism Finally I manged to solve my problem by .decode('utf-8')
My regex pattern is already an utf-8 string but the string I want to check with is not..
So I decoded the input string to utf-8
 
1 hour ago, by davidism
Yeah, my best guess is some weird interaction of bytes vs unicode inside re.
 
aww...Morgan bet me to commenting on that answer
 
it's cruel to ask the cargo culter about the flight schedule of the air force
 
Thanks all..
 
@JGreenwell If you want to comment on more badness, feel free to comment/close this stackoverflow.com/questions/39538618/…
Straight homework dump filled with lots of HELP PLSSSSSSSSS.
 
7:21 PM
yeah, I've seen a few others too
 
DSM
In happier news, it looks like the bandages on my hand (reminder) are about to come off!
 
@MorganThrapp plz closez
 
@DSM Yay!
 
Its a new teaching method: Friday ask for code on SO, Saturday wait, Sunday Beg
its called the Ask, Wait, Beg method
 
@DSM awww, keep getting-well-soon;)
 
7:23 PM
The new DSM will be stronger than ever before. Terrifyingly strong.
Our plastic shard based defenses will crumble.
 
DSM
It's true that the tensor bandage I've been wearing looks a lot like a Muay Thai handwrap from a distance.
 
Tensor?! You're smooth, sir.
 
In early 2017, a desperate president Trump diverts all domestic funding to the construction of a wall along the US-Canada border. Anything to keep the newly ascendant King In The North from turning his gaze to warmer climes.
 
DAKINGINNANORF!
 
DSM
@AndrasDeak: C-oo to the max.
 
7:28 PM
I'm not sure how the rest of the story goes but Trump gets punched in at least three scenes.
 
DSM
Wasn't there a TOS episode where they did single combat instead of war?
Or am I combining the quatloo episode with something else?
 
That sounds like something that might happen in Star Trek.
 
There was a TOS book where that definitely happened
Klingon's also demanded "single combat" when insulted - so could be thinking of that
 
DSM
There were ST books? Man, now that's nerdy. (hides his collection of Diane Duane novels)
 
wim
@here you know when you write a setup.py
and there is the part like
setup(
    ...
    long_description=open("README.rst").read(),
     ...
)
is there a way to have the open / read as a one-liner but using the context manager?
with open(...) as f: f.read() doesn't work here
or do we just don't care about resource management details for simple stuff like setup.py, argparse etc ...
 
DSM
7:36 PM
Oddly enough I found myself facing that very same issue a few weeks ago. I ended up moving the open outside of the setup, just so I could use with. In the real world it doesn't matter, but I didn't like the look of it..
 
@wim pathlib.Path('README.rst').read_text() in python 3.5 or newer
 
Where does Path come from? I'm not familiar with that class.
 
If you're only uploading to PyPI, you don't need to populate long_description, it will automatically parse README.
 
Oh, cool! I've never played around with pathlib.
 
DSM
@vaultah: TIL! I only ever think of Path as being about paths.
 
7:44 PM
PurePath is for working with paths, Path is for working with files or directories
 
@davidism oh gosh Server Fault would destroy that question
 
wim
@vaultah thanks!
 

« first day (2162 days earlier)      last day (2803 days later) »