« first day (1731 days earlier)      last day (3442 days later) » 

Air
Air
19:00
@Ffisegydd If so, my search-fu on MSO fails. It might have been a by-the-way in another Q&A rather than a dedicated feature request; the best way to get stuff like this implemented is to write it up with everything done so Shog (or whoever) can just copy-and-paste if people like it
I swear I've seen it but I'm on my phone so cannot search right now.
Air
Air
Ugh, I can't use SE chat on my phone. Too much of a hassle.
I manage chat easily enough, so itself is a pain, even with the app.
Air
Air
Are you using this stack app? Maybe I should try it. Except when I'm afk I really don't need chat access.
No I just use it in mobile mode
19:07
hello, what's new?
How would i go about distributing a python program that people can run but cannot edit or view the corn?
you wouldn't, devote your energy elsewhere
1) please call it code not corn. 2) you'd have to make it into an executable file using something like py2exe (assuming windows)
19:09
But yeah davidism is correct here
@AaronHall that has nothing to do with what was asked
It saddens me to agree with Fizzy and Davidism
239
A: How do I protect Python code?

Ned BatchelderPython, being a byte-code-compiled interpreted language, is very difficult to lock down. Even if you use a exe-packager like py2exe, the layout of the executable is well-known, and the Python byte-codes are well understood. Usually in cases like this, you have to make a tradeoff. How important...

Zero had an excellent starred comment about this
I was just wondering cause I've been writing a program for myself and a couple friends but the code contains login information to my databases which i dont want them to have access to.
19:13
Read configuration from a file that you don't include with the code
DSM
DSM
I was going to make a case that using exe packagers can be useful, but certainly not for providing security for passwords.
So someone installing your program must also configure it
Can I make requests to localhost with a localhost on a different port? Keeps giving me annoying errors
Daniel, vaultah's link contains an answer by Ned that might work well for you, I've used swig to import a program compiled from C code, it's fairly simple to implement, actually.
19:16
I don't speak salad, so I don't know what you mean there.
Mar 21 at 17:02, by Zero Piraeus
The Two-Pronged Iron Law of Code Obfuscation is:
1. No-one wants your code.
2. If they do, you can't stop them.
That was a swine to find on my phone, but it is worth it :p
I wouldn't bother starring it, the original was starred excessively :p
hahahahaha
Air
Air
Plus, only the URL shows up in the star list when you star a oneboxed thing
Indeedilydoodee
DSM
DSM
I agree with Zero in principle, but since even a modest barrier eliminates all but the most determined, I'm not sure it leads to a "don't even bother" policy.
19:20
@Air it's all about the big list, not the current list, everything shows up correctly there
Unless you are the main characters of HBO's hit series Silicon Valley, it's probably not worth it.
@DSM true but I suppose it's similar to the argument against security through obscurity.
"By all means obfuscate, just understand it's not ironclad."
DSM
DSM
Rhubarb for you as well!
Air
Air
@davidism How often does anyone read the big list?
Every day during The Big List Ceremony.
19:27
I look at it about once a week for a good laugh between "gimme teh codez plox".
@Ffisegydd why aren't you tethering your phone?
I did and burned through 25% of my limit in a single day
Matches my experience. Beat my record!
I don't have a very big limit as I don't normally need much data
@Ffisegydd Don't tell me what I can't star.
5
19:29
@Morgan LOL - as long as you don't tell him what he can't unstar - seems fair :p
Does anyone know if there's a difference (performance-wise?) between node.xpath('./some_element') and node.xpath(*[local-name()='some_elemet']") when parsing XML?
Sssshhhhuuuuudddddduuuuupppp
@AutomaticStatic well, the second one is a syntax error, so I'd say the first is a better choice
Air
Air
@AutomaticStatic Yeah, the latter's going to be way afs--
-__-
Anyone know why i can't treat exec as a function and call it in a subprocess? code_process = Process(target=exec, args=(user_input_code))
19:31
@davidism So what you're saying is... the second one runs in constant time?
@davidism OK I missed a quote...
@Air what is afs?
@Skylion if you're using py2 it's because exec is a keyword, not a function
I see, do I need to import it as a function then from __future or something?
>>> import keyword
>>> 'exec' in keyword.kwlist
True
Air
Air
@AutomaticStatic I was typing "faster" and then davidism got to the joke first
19:32
yes, that's what I just said
thank you
Air
Air
So I guess now we know the difference performance-wise between me and davidism
why is the latter faster?
Because it doesn't run, it fails.
OK, well if anyone who has the patience for a syntax error in a chat room would care to answer the question, I'll be here!
19:33
@AutomaticStatic also, why not just timeit yourself?
Ooooooohhhhhhhhh
I can't tell which way the syntax error goes, it looks like you added an extra ", but you said you left one out
@davidism what I'm really asking is whether there ought to be a reason one is better or faster
So start by asking a good question, then we'll talk
OK the latter code is node.xpath("*[local-name()='some_element']")
19:35
@Skylion there's a problem with the args argument too:
150
Q: What's the difference between eval, exec, and compile in Python?

andrewdotnichI've been looking at dynamic evaluation of Python code, and come across the eval() and compile() functions, and the exec statement. Can someone please explain the difference between eval and exec, and how the different modes of compile() fit in?

 args=(user_input_code,))
and the question is, is there any reason that ought to be better or worse than './some_element'
@AaronHall if you're sending one line of code, use backticks or it looks weird
a one-element tuple must have a comma
19:36
@Skylion so you can use eval and compile to do what exec would do
@AutomaticStatic given that we don't know a) what xml you have b) what xpath util you're using it's hard to answer, and even if we knew, it would be easier to just time it
Hmm, I can't figure out how to import exec as a function from the future. Is eval really identical to exec? Is there any difference in behavior?
@Skylion You can't import it, as we just said earlier. Read the question I linked you to.
sad, this...
Who said you could import it from future? I'd do some googling.
Interesting... Isn't Eval in built_ins? So that would mean you wouldn't be able to sandbox an application by just specifying builtins and forbidding imports right?
I thought @davidism suggested that is what I should do, but open rereading the conversation I think he was referring to Air's comment
19:41
And how would you forbid imports?
Why not try it and report back once you get hacked? Or, you know, search google.
DSM
DSM
Ah, I was going to recommend the pypy sandbox approach but I see it's already mentioned in that answer.
I am searching Google and I think I'll try your advice with eval upon reading that question you sent over.
Please stop asking us if highly upvoted answers are really correct. You're basically just re-posing questions you read without context, and without understanding.
19:51
white noise from AC blowing
Just finished Daredevil… and now I’m sad because it’s over already. Meh.
You could watch the Daredevil movie. That way you ease into disappointment instead of going cold turkey.
You could walk around your home blindfolded to get the full experience
Learn to echo-locate with tongue clucking.
or build some bionic hearing aid that links directly the the visual cortex
19:58
@JGreenwell Sounds simple enough. I can do that with jQuery, right?
hmm...no, no. You'd need jQuery and PHP
@JGreenwell PQuery?
and blink tags
<blink>PHP IS THE BEST</blink>
ducks
Do any browsers still support <marquee>? It seems a lot more useful now that we have unicode cars.
20:01
who or what thought blink tags were a good idea I will never know
@QuestionC Chrome does. As does IE.
unicode cars - that's a new one... normally they're manual/automatic... didn't realise they were rolling out unicode ones :p
oh, I know who is credited as inventing them...I still think it was some type of mind control or government plot or something else sinister
@QuestionC also Safari
ok, going for some food, who wants something?
cooking paella atm
20:08
Sounds good.
I'll be right back. Don't go away. :D
> 50 Cent bankrupt after being sued for 500 million cents
:\
and every person on chat just converted that to dollars in their head
grudging groan of appreciation
20:16
I’m pretty sure Jarvis doesn’t use Google to reply. — poke 13 secs ago
How do you find such terrible questions, Vaultah? I can almost guarantee if you post a cv-pls it will be closed before I can even get to it.
@vaultah Aw man, I was looking forward to using his program. I mean, all he had to do was connect it to Google and then I could have all of human knowledge at my fingertips.
There was my comment "Are you not satisfied with "Ok Google?"" but it got no upvotes ;|
I like the way he specifies he's going to use raw_input. Maybe in time someone will develop a text based front end for google, to replace this tired old voice recognition stuff.
20:25
I’m going to slap a delv on it.
I had "OK Google" enabled on my phone until this: I was talking to my dad, the phone on a table. Describing banjo playing, I joked, "I don't have to worry about sore fingers anymore because I have killed the nerves in my fingertips." My phone thought I said "OK Google" and searched for "I have killed". Yeah, thanks phone.
Rhubarb Guys :-)
rbrb @thefourtheye
Could have searched for worse from some slight mis-recognition in that sentence, TBH. A colleague of mine discovered OK google on Friday. I heard about the weather in various places on the globe rather a lot -___-
20:31
I think I have enough time to study grammar (after a number of promises)
@JRichardSnape ahh... I've seen the yogscast ok google competition - that made me laugh
So who's having a great day? I know I am!
How do room owners for the Python room get chosen? The Ruby room is getting more popular (yay), and it's starting to need a wee bit more structure than I've given it. I like how this room is run, and aim to copy whatever makes sense.
Excalibur? moistened bints?
That would be cool. That would not be so cool.
20:38
---test---
Alright, I give up. How do you do strikeouts?
@AaronHall I have compoleted 6 hours writing towards my PhD. I now have words in every chapter whereas I started the day at only 7 out of 9 (quality and quantity not yet there, but it is a start). Considering a G&T - this counts as a great day after some months of difficult times.
---struckthrough---
However, it seems i can still mis-spell completed
DSM
DSM
@JRichardSnape: yeah, it's a lot easier to add and edit words on a page than starting at one hundred and fifty blank ones..
20:41
@WayneConrad I think it's really important to have a sense of humor, aim for respectability, while tolerating irreverence.
@WayneConrad I can only guess, but it looks like current room owners propose/discuss candidates on private boards (Trello or something)
> This room is a self-selecting community. The room owners are the people who created this community.
it's so much better working with angular again... angular best front end framework
DSM
DSM
@vaultah: that seems to be the current practice, although there's often discussion on slack beforehand. I'm not on slack so by the time I hear there's a candidate it's already been more or less agreed. :-)
I wanted to mention Slack as well but I thought you use it for sopython.com stuff only
@corvid My last job was using Knockout....horrible framework
20:44
Knockout is bretty meh.
@AaronHall It's pretty much the Mr. Rogers rules :)
DSM
DSM
@corvid: huh. I bounced off Angular when I gave it a go. I've been enjoying playing with Aurelia as it's being developed, though.
@DSM I'm hoping so :) External trials and tribulations are hopefully at an end now and I can concentrate through to the finish
@WayneConrad I'm maintaining Core Python and Related Architecture in case this room goes sideways. If you'll check it out, you'll see there's enough room in the description for rules.
20:58
I only see one
one's deleted
> You need to expand good into individual arguments using the * syntax. print (*good, end="\n")
by someone who should know better, referencing the answer you marked as the duplicate
The deleted answer ^
for ... range is an anti-pattern. Use sth. like good = [gpa for gpa in student_GPA if gpa > avg] instead, — Daniel 3 mins ago
21:00
Rb, everyone.
When exactly became for … in range(len(…)) an anti pattern? Where does this come from?!
Air
Air
@poke "I saw someone call some code an 'anti-pattern' and then everyone agreed they were wise and it was not good code. I will call code I don't like an 'anti-pattern.'"
meh
Air
Air
Not to be confused with an antti pattern.
also that doesn't do the same thing (OP was appending the name not the GPA)
@Air Nice one.
Air
Air
I just always assumed that if @AnttiHaapala ever writes a book about programming in Python it would have a title like "Antti Patterns for Python Programming"
In this case the anti-pattern would be the use of multiple lists for data that would fit in other forms better (like dictionary)
Air
Air
because clever wordplay is more important than marketability, amirite
I'd read that book
21:06
@vaultah that seems too close to arguable personal opinion
Thanks a lot, guys. Good Night :)
in JavaScript, 31 secs ago, by uselesschien
x-post from python
Air
Air
It is a pretty bad use of range though
although I'd never want to have for i in range(len(foo)) in my own code...
21:08
@vaultah y u spoil fun m8
Air
Air
What's worse is the implicit dependency of both lists on the same indexing (IMO)
how he know so soon?
lets pick another one
If its homework, I know a few assignments that call for this type of implicit listing (most of the time to point out how much better other methods are later while just explaining loops and lists at that point)
Air
Air
They still could have enumerated
that's the main reason.
21:12
some professor mark you down for using other methods (seriously it is silly but some do)
I usually had to write the broken code and then make a better version for my own sanity later
Air
Air
Well I mark them down, @JGreenwell. I mark them down.
:[ Good night...
Air
Air
Somebody get rid of these clowns.
If I were in that situation, I'd demonstrate all the ways of doing it, profile the code, discuss pros and cons, and summarize a conclusion.
Air
Air
21:14
The hero we need!
Air
Air
Okay, overdue for lunch. rbrb.
....I did that for one and then I relized I had kids and a wife and a job too think about too :P :)
included an SQLite Database too :)
cbggggggggggggg
21:18
Luckily, I've only had one professor like that and it was for Powershell....using the book "Powershell 2.0: A complete idiots guide"
@poke, oh great and mighty one. I am way too much of a newb to even comprehend the question you said mine was a duplicate of. I shall take my very childish questions else where from now on, since I feel so warmly welcomed here. — Elfess 7 mins ago
wat
😬
Hmmmm, passive aggressive sarcasm. Always a winner
That’s your fault alone @vaultah!
😲
21:23
@vaultah so, how did you find out about that? Were you in the JS room?
DSM
DSM
To be fair, I kind of like passive aggressive sarcasm when I'm on the giving end.. :-/
@uselesschien No, your profile page has the "currently in rooms" section
okay, paella is done (traditional with rabbit, sausage, and octopus) time to eat. Rbrb.
I guessed you accidentally posted your message to the wrong room
21:27
@DSM Can’t blame you for that :P
Mind you - I've realised I forgot to leave the javascript room from this morning :p
not to worry Jon, you might get some useful lessons in room ownership from there, I reckon ;)
user559633
^ heh. how's the talk coming @AaronHall?
What, mine? I've almost started!
user559633
21:39
Ha! I worked on my teaching metaphors last week and ended up getting interested in the history of space programs.
@poke, I was fairly certain that my comment stated that I do not have a clue what that particular question was even asking. I do not know how to make that any clearer. It appears to me that you did not fully read my comment. .join(map etc... makes absolutely no sense to me, and it appeared she/he wanted 'p' from that mylist.... IT MADE NO SENSE TO ME was my point. Excuse my sarcasm, but I am not having a good day, and you just kinda landed as that last straw on this camel's back. — Elfess 4 mins ago
I’m getting all the hate
I've been watching Comedy Central standups and getting really bad influences.
user559633
@poke Bleh, let it go. You're skilled and you've never been anything but helpful to me.
Haha, don’t worry about it, I’m not taking that personal
I just replace “poke” with “vaultah” in my mind anyway :P
user559633
@AaronHall Yeah, I watched a Bret Victor talk and almost steered into "so what is web development and what are we doing here anyway?" territory before remembering that Bret is brilliant and I'm talking at a conference for a language I've been using for 2 1/2 years.
21:41
How do I make something dry like the "data model" entertaining and a learning experience?
Make a data model about water? :P
(sorry, couldn’t resist)
user559633
@AaronHall Yeah, I've been thinking about that a lot too. I have it to the point that I think it will be a generally interesting concept for people, even if they decide to tune out the "okay, variation 3 gives us X bloops in only Y blurps" details that make up the depth of the talk
Ummm... stackoverflow.com/a/620397 could do with a bit of expanding if anyone is feeling generous
user559633
@JonClements "l i n e c a c h e"
^ Interesting definition of HD
21:46
I need a schtick of some kind...
and I need to remember I'm doing it for Youtube.
user559633
@AaronHall what are you using for examples?
everything
I'm going to draw from every major library I can
I don't think it will be a live coding deal, but I'd like to work that in too...
How long is your talk?
30 minutes. I'll be talking very fast.
user559633
@AaronHall Daring. I have a portion in mine in which I'm going to show responding to web requests by having the application hang and have me look it up the answer and type return 'some_sequence'.
21:49
Don’t cram in too much though :/
And I won't be repeating myself
yeah, live coding is probably out
user559633
I want to shoot for exactly 25 minutes so no one can ask a question and make me start crying out of stress.
user559633
Just kidding, that will happen anyway. (not really, the last time i talked for an event, i practiced in front of people a few times and it really helped)
Yeah, gotta practice
If any of you would be so kind as to tell me how to delete my account — Elfess 14 mins ago
Uh
user559633
21:53
@vaultah 50 points to linking to the faq (stackoverflow.com/help/deleting-account)
user559633
I'm torn on those cases though. Member for fewer than 2 weeks, obviously got stressed/offended, but didn't read the FAQ, and responds to feedback with passive aggressiveness.
I wouldn't give them that link to protect them from themselves
@Elfess just because you're having a bad day doesn't mean you need to take what's genuinely offered help as a personal offense. I'd suggest taking a step back, unwind a bit, and then try to understand the answer you've been pointed to that will help solve your problem. If you still have problems from there, post a new question with your attempts and what you still specifically don't understand and I'm sure someone will be happy to explain it. — Jon Clements ♦ 35 secs ago
upvoted
22:02
Not sure if it's worth giving it a go, but we shall see
I was writing something similar
user559633
I voted it down and flagged it as non-constructive ("is a series of faint barking sounds")
@tristan ahhh... I know you luv me really MTFL!
user559633
Yeah, actually, this room is one of the warm centers that reminds me the internet is not all facebook and twitter and people complaining about the buffer rates of dubstep music videos
8
❤️
22:11
I didn't get any Python written today, but I did crib from your room rules, for the Ruby room. Thanks for setting what I think is a great example. See you tomorrow, rbrb.
user559633
take care @WayneConrad
rhubarb @Wayne
@Wayne rbrb!
user559633
i don't social media much, so whenever i see a biography field, i get lost in my head for a few minutes trying to create a meaningful representation of myself in my mind before realizing that they're really asking "what value do people expect from you and name a relatable 'interest'"
user559633
22:22
cbg
@tristan My biography fields usually end up being empty…
cbg @BhargavRao
It's 1:30AM, I'd be sleeping
Instead I'm painting my pink toothbrush black
@vaultah well - everyone's gotta have a hobby I guess
22:37
Interviewer - Any hobbies? @vaultah - I paint PINK toothbrushes black
:P
pink toothbrushes :)
user559633
@vaultah Hah, why are you doing that?
To make it look black
user559633
Also high five utc+3 buddy
@tristan so then he can paint the black toothbrushes pink silly!
user559633
22:39
@BhargavRao nice.
So he has only two colours?
I needed a new toothbrush, but the room was dark and I picked the same toothbrush as my mom's
Then you painted it black? In the dark where did you get the paint for that?
Wow I can become an investigator :P
And turning on the bathroom light didn't occur to you?
:D No, because all new toothbrushes are in my mom's room and she's sleeping
user559633
22:45
@vaultah If you put the toothbrush under your pillow, the tooth fairy will visit in the night and place you in a foster home.
I painted it black because I only have a black Sharpie on my table
I have a NaN value in my dataframe and when I do df.iloc[2,1] == np.nan or pd.NaT or 'nan' or 'NaT' or float('nan') it is False. Does anyone know other ways to generate NaN?
@tristan Correction - Toothbrush fairy
user559633
If Python is a high level language and C is a high level language, are there better terms to separate the two? Do I have to say "very high level language?"
user559633
22:48
@AsavPatel Check out the room rules. This isn't a free bounty setup.
@AsavPatel Do wait for some time on the main site :)
sry...I am new to chat
Have a look at sopython.com/chatroom
The rules are quite simple :)
thanks... (y)
Okay, it's time to use my glorious black & pink toothbrush and get some sleep. Sorry if I annoyed you with my broken english and rhubarb all :)
22:52
rbrb
user559633
@vaultah haha your english isn't broken
remember to colour the bristles black too
user559633
you have no reason to be self-conscious
user559633
have a good night :)
BTW @tristan Howz the new job of RO?
Kicked anyone?
:P
22:56
ty @tristan, you too
@vaultah sleep well
Air
Air
My hobby: Condition my brain to expand "RO" in stack chat rooms to "Resident Octopus"
@Air because....? :p
Air
Air
@JonClements Why not? Octopodes are very intelligent.
We should all aspire to being able to cover annoying coworkers in ink clouds while we make our escapes.
@Jon You mite be interested in this :D
user559633
23:02
@BhargavRao hah. it's fine. haven't kicked anyone, no.
Looks like a twitter account worth following :)
@tristan you can kick me if you want? :p
Haha. I think the kick function is disabled for mods
Apr 29 at 21:43, by Jon Clements
@Martijn ahh the kick-mute disappears on your profile...
user559633
@JonClements heh, no thanks, and i don't want that.
@tristan your time will come :)
23:25
That's brilliant - think I've seen that posted before ;)
Hmmm. Mods have a special link 'mod' before share. :|
user559633
user559633
was reading an article and had to check the file type -- wasn't sure if it actually blinked or if the stress was getting to me
Air
Air
23:42
@BhargavRao ...yes? So? Why the face?
I did not know that earlier. So the derp like face
Air
Air
I have always interpreted that as an "unimpressed by this bullshit" face
That is -_-
Air
Air
ಠ_ಠ
Varying degrees of severity, or flavors
We need an look of approval emoticon too

« first day (1731 days earlier)      last day (3442 days later) »