« first day (1581 days earlier)      last day (3593 days later) » 

15:03
@CBenni Wouldn't it still allow a long streak of losses? Not sure if you're keeping track of that as well
I dont think it would. I can double check however
@BhargavRao you'd want to remove your comment ;)
Sorry wrong link, Good answer though
@Kevin i.imgur.com/pl6ejni.png is the results btw
They are amazing, even for smaller iteration counts
even the expected value is better
If this is in a gambling context, I worry that it might be dangerous for the house. Ex. if a player recognizes that he never gets more than six heads in a row, he can adopt the strategy "bet pennies on heads until you get six in a row, then bet a million on tails"
I don't know if your generator has that particular weakness, mind.
15:11
@Kevin yeah. I would not use that in a setting where money is a factor. Haha. However, it is used in a gambling setting, with the aim of reducing the frustration probability.
I added loss streak counting and cleaned up the code a bit: http://pastebin.com/mD5PqmRh
@Kevin Fair point, but his current timing tests are totally yammed. :)
I have a feeling that any algorithm that reduces streaks, could be gamed by clever users. But I suppose that's fine, as long as you're not putting your own money on the line ;-)
crap, I had 2 issues in the 2nd part, copy+paste errors >_> pastebin.com/spdVCw96 fixed.
If you're just coding up a casino for your Final Fantasy clone, then nicer odds makes for a better user experience.
Yeah exactly, thats basically the idea. The win % is still the same, so this isnt biased or anything
it just prevents people from getting frustrated. I myself have been frustrated by losing 20-ish times in a row
Its a tiny bit annoying, since I will have to keep a counter for each user, but redis does that for me :P
15:23
rhubarb
16:11
Pint anyone?
cbg
remote pint?
Fellow starbaiters may be interested in this userscript, which tells you whether your message will fit on the starred list without being shortened. This message is apparently too large by 98.
DSM
DSM
I'd say yes -- morning cabbage for all, by the way -- but I didn't get nearly enough sleep last night, and so morning pints may not be a great idea.
It's the Bath cider festival tonight, there will be many pints.
16:16
Don't suppose anyone out there is rich and wants to buy me a new camera?
Sorry, I'm not rich enough.
DSM
DSM
Just use a colour camera but print it out on a black-and-white printer. You youngsters and your toys.
It's better though! More pixels for black/white! Plus it's a Leica so, colour or not, it's gorgeous.
Who needs a camera? I just project light through a pinhole into a dark room onto paper treated with photosensitive chemicals.
16:19
@Kevin that is camera, you insensitive clod.
;-)
ahh I miss the old slashdot :(
Current slashdot is... Less than ideal.
SD has gone down hill. I accidentally read some comments on it the other day.
Did you proceed to the nearest eyewash station, as you learned to do in your safety briefing?
16:21
back then the submissions were less than ideal but the comments were always fun... now there is nothing worth reading.
@Kevin My tears washed away the pain. No need for eyewash.
I'm quite flinchy so I don't think I could use a machine that fires water into my face.
If the need ever arises, I authorize each of you to knock me out and rinse my eye for me.
I've had to use eye wash before, it's not that bad, just hold it to your eye and look upwards then blink. It doesn't "shoot" per se, or ours don't.
DSM
DSM
If I'm in circumstances where I want to wash my eyes, I want a bloody fire hose if necessary.
In America, we do everything ten times more intensely. This includes the pressure of eyewash streams B-)
(This also explains why bidets are hugely unpopular here)
16:26
you know the word bidet?
I know of it.
I have never used a bidet.
They say it... Changes a man.
Remind me, why do we not use == None?
Ive been to Europe ... and South America ... both places had bidets ... let me tell you if there is no toilet paper you will definately use a bidet
16:28
in Finland there is the bidet shower
@davidism My guess is, "because is None looks more like natural language"
because None is an identity ... so is None works great... == None i think works though in all cases
because None is a singleton?
@JoranBeasley == None you can actually override.
16:29
Right, I know the "it looks nice" reason, but was there an actual "something unexpected might happen" reason?
I suppose there is a slight difference in behavior if some joker decides to implement his class so __eq__ always returns True.
oh yeah fair enough @AnttiHaapala
class FalseNone:
     def __eq__(self, other):
          return other is None
that seems like with that class you would want to use == None though
that looks like it was deliberatly done
>>> FalseNone() == None, FalseNone() is None
(True, False)
16:29
The question is, is there ever a difference for classes that don't have weird __eq__ overrides?
Time difference too?
yes
if they have silly __eq__ methods
if for example they do isinstance()!
oh boy that is goin to be slow
if you are overloading the __eq__ method I would assume you would want everyone to use ==
In [1]: %timeit 1 is None
10000000 loops, best of 3: 48 ns per loop

In [2]: %timeit 1 == None
10000000 loops, best of 3: 76.6 ns per loop
that is easy
16:32
Because those 30 ns matter!
Every ns is a precious gift
is that a pun on Life of Brian?
@Ffisegydd for pathological case you need to have the eq method in python
The real reason we do it, of course, is "If we don't then other people in the room will laugh at us." Peer pressure, the best reason for everything!
16:33
light can travel an additional 28.6 feet during time difference
Maybe subconsciously. I was thinking about Monty Python sketches a minute ago.
In [5]: %timeit fn is None
10000000 loops, best of 3: 44.8 ns per loop

In [6]: %timeit fn == None
1000000 loops, best of 3: 210 ns per loop
I wish Grace Hopper was still around so I could get one of her light-nanosecond wires :-(
I also want a Utah Teapot. CS memorabilia!
@Pete I think you have an error there?
30 * (10^(-9)) light second =
29.5071317 feet (29 feet 65⁄64 inches)
google says.
does anyone use nose and nose-timer
16:38
or did you calculate the exact :d
is there possible to return a class instance as a value of a dicrtionary?
@KeremZaman yes.
you are correct. The quick number/estimate is a foot per nanosecond. Laser guy trick.
DSM
DSM
Why not? Pretty much everything you can think of is an instance of a class.
I wish I could put "laser guy" on my business cards.
Readers will be like "is he a laser expert, or actually made of lasers?" The intrigue will get me more interviews.
16:39
@KeremZaman that is to say: there is nothing in python that you could put as a value to a dictionary that would not be an instance of a class.
DSM
DSM
"Author of KevinScript, language of champions" probably opens a lot of doors already.
Kevin Kevinson I approve of your use of "laser" over "lazer". If more Americans were like you then...well...the economy would probably collapse from mass-MtG-purchases.
in CPython all PyObjects always contain a reference to PyTypeObject *ob_type;
thnx I think this solve problem But I got error UndefinedError: 'users' is undefined for jinja in "<br> {% for friend in user.is_bestfriend %} {{ friend.name.capitalize() }} is Best friend <br>{%endfor%}</div>" can u help me or I should ask new question ? @davidism — Linda 4 mins ago
@AnttiHaapala @Ffisegydd well, my code is so:

def ReturnFar(self,isim):
farlar = {"Sağ Far":self.sagfar,"Sol Far":self.solfar,"Toros Farı":self.torosfar,"Angel Eyes":self.angeleyes}
return farlar[isim]
16:41
:-| I really want to respond "What do you think?"
I have key error, what can be the reason of it?
I took the temptation away for you.
That user does this every single time, asks a new question in the comments.
@Kerem possibly it's because one of your keys has an error in it.
@KeremZaman python 2 and you are mixing unicode with str
16:42
I'm not exaggerating.
Ah, touche. Python 2 spits.
@davidism Then he would reply "I think you should help me right here" and then start asking his question in the comments.
@AnttiHaapala can it cause this problem?
DSM
DSM
And it seems like we're really talking about attributes of a class instance, not an instance of a class -- although the question turns out to be entirely different, and about finding keys.
I vote to close this conversation until we get a minimally reproducing code sample
16:44
Seconded.
@KeremZaman definitely, you can print repr(isim)
Code works fine... For certain values of isim
(If we get to 5 votes what do we do? Shut down and close the chat room? D:)
Uhhhh >_>
16:45
@Kevin @AnttiHaapala ok, I try with non-unicode string thanks
i tried installing sqlalchemy yesterday; easy_install Flask-SQLAlchemy
voted
@Joe use pip, did you do it in a virtualenv
@KeremZaman noooo try with everything in unicode
@KeremZaman or install python3 now if possible
ANSI forever!!!
python 2 spits as @Ffisegydd said
16:45
anticipating top two problems
no i didn't do that in virtualenv
1 message moved to Trash
@Kevin ANSI = American National Standard Insanity
please use gist.github.com for code blocks
:-D
16:47
so how do i do it in virtualenv?
i thought the virtualenv was just a recommendation by sqlalchemy not a requirement
it doesn't matter, your problem is that you're trying to do db operations outside an app context
either do your operations inside a view, or put them in a with app.app_context(): block
i'm getting: ImportError: No module named MySQLdb
GOOOOOOOOOONG
@JoeSaad did you install mysqldb?
that would be the logical first step
Read the SQLAlchemy docs/tutorial/look at the sopython code before asking more basic questions about sqlalchemy.
16:57
I just had to explain OO to a coworker (granted he does all his work in C)
I still dont think he understands
@JoeSaad ... GL ... sometimes mysqldb can be hard to install on windows
stackoverflow.com/questions/28504724/… dupe, almost the exact same question got posted yesterday
Well, at least you understand that he doesn't understand. It would be worse if you thought he got it but he didn't.
DSM
DSM
You can do OO in C. Heck, given the way C++ works, you basically have to do C-style OO in order to do some OO in C++..
Now you can keep an eye out for misapplications of the principle during code reviews.
no he was trying to alter a python script
and though classes were functions with nested functions and stuff like sendsdi12cmd was a builtin method
then I thought he got it
but then he said "so whatever is after the last dot is a method?"
17:01
But I couldn't make new bestfriend it is unchangeable I think how can I do something to make it change so if I want to be friend with new user it would be possible @davidism — Linda 1 min ago
can anyone decipher that?
You're her new best friend.
@Joran I'm trying first on mac osx and i'm going to eventually migrate all that to unix box
DSM
DSM
Could be "his". There's a github guy whose name is Lin Daho, or something similar, if memory serves.
So "Lin Da" wouldn't shock me.
@MarkAdler and? It's still the same question, which is "why don't these crc's from other tools match what I've calculated?". — davidism 2 mins ago
I don't think I'm very good at talking about duplicates. :/
@davidism: they have a point there.
Also, Mark Adler is someone that knows quite a bit about CRC32 calculations.
DSM
DSM
17:07
Well, Adler has a particular interest in the subject..
@Martijn: hey, my hint was more subtle. :-)
So it's not the same question?
I'm pretty sure that's the same question, but ok, I'll just remove myself.
Also, despite his expertise, that answer is not very good.
@DSM the computer version of "package check", LOL
DSM
DSM
Feels more like a comment, TBH.
yeah, exactly
Yeah, that's a comment, somewhat helpful, but still a comment.
I duped it. It is the same kind of LQ question, the masking is circumspect, the claim that an unnamed tool does the hashing right matches too.
17:18
@Ffisegydd I loved it too, especially the first episode's end, when he finally turned to the "fourth wall" and started speak to us.. I had goose-bumps IIRC :)
one more vote on that one too.
dang I feel like crap ... I gotta get this stupid package built so I can go home :(
@MartijnPieters <3
closed the other one
good to know I'm not entirely crazy
@davidism: I reopened it again. The user came back, added the tool, admitted to being on Windows and what the file contents were.
17:58
Looks like @davidism's best friend is back with a new question
They are having a very hard time understanding the concept of "don't use a list for something that's only one thing"
This is literally the same problem as the other one, just instead of assigning a list to something that's not, they're iterating over the not-a-list
The ABC cartoon Recess teaches us that you can have more than one best friend, though :-)
Heartwarming, I'll let them know.
Recess was awesome.
I only remember like three episodes, but they were pretty good.
DSM
DSM
18:26
Ehh, Weekenders was my school cartoon of choice. To this day, I use "later days!" as a farewell.
Anything not on Nickelodeon or Cartoon Network was an afterthought for me, really.
Even Kid's WB was a crapshoot, mostly due to its shuffling schedule. Maybe you get Animaniacs, maybe you get Batman: The Animated Series (at the time I was too young to recognize its greatness)
Same, and Cartoon Network was second place to Nick.
(The somber, muted, contemplative show wasn't appealing to me as a kid? You don't say?)
Surprisingly, barely watched any Toonami.
Getting 80% of the way through Dragonball Z's longest arc, one episode a day, only for it to start over at the beginning so they had more time to dub the rest, may have legitimately traumatized me.
Oh man, planet Namek's going to explode, I can't wait for tomorrow! ... Why are they back on Earth?
DSM
DSM
18:34
Never watched a single episode. Partly it's that the animation style never appealed, partly it's that I was the wrong age at the time.
Yeah, in retrospect there's a lot of repeated frames and "zwee fighting"
Re-watching Eureka Seven right now, and contemplating if I want to sit through E7AO's story. The visuals and music might be worth it.
"They're moving so fast, not even trained warriors can see them!" means "we ran out of animation budget"
The music for both is so good.
DSM
DSM
I liked the storyline of E7 a lot. Haven't seen or read any of the followup stuff.
18:37
I couldn't get into that show when it aired on TV. I think a lot of shows suffer from a one episode a week time slot.
netflix keeps telling me i would like it
Maybe I should give it another go, now that we live in the age of marathons.
DSM
DSM
(And yes, I may have "Days", "Storywriter", and "Fly Away" on the tablet.)
@DSM the movie is a different timeline, the sequel covered no new ground in terms of concepts and message, and had a really convoluted and full-of-holes plot
Bah, alternate timelines. I had enough of that after the second Tenchi Muyo reboot
DSM
DSM
18:38
Ah. Then maybe I'll just leave it on the mental shelf and be thankful for a mostly well-done story even if they didn't quite stick the landing.
Just listen to the soundtrack on youtube
DSM
DSM
I liked Tenchi Muyo GXP, which I thought had some surprisingly clever twists.
@JoranBeasley does it have it subbed? The English voice actors/script were hit-or-miss. (Which I guess is pretty typical.) I liked both though.
most of that stuff is subbed ... not dubbed... at least in my experience
(on netflix)
DSM
DSM
[reading through the soundtrack listing] Oh, I forgot Sakura! Liked that one too.
Nirgilis did Snow Kiss, too, which I also liked. Every time I hear it I think it'd be the perfect music for a movie trailer about a Japanese exchange student who visits Vancouver and falls for one of the locals. "5000 miles. 20 degrees below zero. Two cultures. Only one way the story ends." Cue Snow Kiss chorus.
18:46
Hmm, not sure if Japan's interest for American culture extends that far north...
that totally makes me think of that snow train movie that came out last year
Snow Piercer?
yeah
that one
Haven't seen it yet, it's in my queue though.
DSM
DSM
I'm going to delete that, so if years from now I release the screenplay pseudonymously no one will be able to figure out it's me.,
18:49
Even though @PeterVaro retracted his suggestion ;-)
I tried 192 different CRC algorithms with these 88 hexes from the string with 44 bytes decoded and hex through the CRC as is, for a total of 1152 combinations, hypothetical line endings from files and so on, and matched them against both values and their byteswapped versions and couldn't find a match for among any of them. — Antti Haapala 6 mins ago
@Kevin its not bad .... not as amazing as I heard it was ...
DSM
DSM
Hmm. How can I delete my own messages?
click the arrow to the left of the message
?
DSM
DSM
I can pin or flag; not seeing a delete.
18:51
cbg anw
DSM
DSM
I guess the delete window elapsed. Oh, well. So much for my second career.
@MartijnPieters noticed that I was in a good thread when saw Mark Adler
Once you become rich and famous, you can bribe the SO sysadmins to delete that line from the transcript
@MartijnPieters I couldn't get any of the results he provided with anything imaginable
@JoranBeasley, maybe you're thinking of reversed, which is a built-in type.
Shouldn't hurt too much to have a variable that has the same name as a list method. Like, I wouldn't criticize someone for using count.
@AnttiHaapala The binary vs. text was a good guess, the kind of guess that you make when you've seen enough of those mistakes before.
@Kevin yeah ... maybe ... I thought reverse reversed in place ... (ie sort vs sorted)
That's a reasonable assumption
@Kevin ahh yeah thats what I was thinking about (the list method)
18:57
@MartijnPieters I have had to solve CRCs myself so I decided that I make a program with PyCrc and copied all polys from wikipedia to aid myself better, but the huge letdown was when I realized that OP's code does not even spit out the result they was sayin'
mark adler is an idol :D
Air
Air
Write a function that returns true if its input is frabjuous, false otherwise. Do you prefer to name this function frabjous or isfrabjous?
is_frabjous
agreed
DSM
DSM
I'd use is_frabjous, and it annoys me that the string .isdigit etc. methods don't follow that pattern.
*sorry is_frabjuous :P
19:04
If I'm going to use an adjective by itself as an identifier, it's usually as a constant.
Air
Air
I guess it should be obvious from the standard library that we like the verb
frabjuous, mimsy, mome = 1,2,4; outgrabe(raths, mome | mimsy)
Hmm, this illustrative example isn't too illustrative when I use fictional words. Oh well!
I never use adjectives as names I guess... except nouned(what's theword) adjectives
DSM
DSM
> "And hast thou slain the Jabberwock?
Come to my arms, my beamish boy!
O **frabjous** day! Callooh! Callay!"
He chortled in his joy.
Air
Air
For some reason I always used to read it with the extra "u" but I did correct myself :P
19:07
The Vorpal Blade is a surprisingly middle tier weapon, despite its 5% chance of beheading. I prefer Mjolnir or Magicbane.
DSM
DSM
.. and with that, it's definitely time for the usual Friday dishes delivered straight from the subcontinent. Rhubarb, all.
Air
Air
^ That humblebrag. :(
@AnttiHaapala I've had my back-end handed to me by a countering answer from Mark. He knows his stuff.
Anyone want to try and reproduce my profile bug?
Steps: go to your profile page. Click on the 'mobile' link in the footer.
Either you'll get the same error, or not. Both are interesting.
To get back, get to a working mobile page; click Users for example. The full site link in the footer gets you back to the full web view.
Air
Air
@MartijnPieters Reproduced.
@Air thanks, then it is at least not just me.
Air
Air
19:16
Would you like me to leave an anchor comment for people to upvote instead of 100x "repro" comments?
Not sure it's necessary unless someone claims no-repro and starts a battle of the builds
Or you could just edit the question to reflect it's been reproduced by people in chat.
GOOD LORD. What just happened?
Also reproduced, FWIW
@Air Nothing.
It seems that clicking the mobile button puts you into mobile mode, even though it takes you to an "oops" page.
@Air It is actually reproducible on any profile page, not just your own. Edited to reflect this.
Look for a "full site" button in the footer to restore normality.
19:21
@Kevin Yeah, the Oops page only has a full-site version.
Oh, now my profile page is completely broken, even without the mobile button.
So that is served in full-site mode even when in mobile modus.
Same for review pages, or your flag status page, etc.
@Carsten You are now in mobile mode. Go back to full site mode.
Air
Air
@Kevin My knight in shining cabbage!
@MartijnPieters Oh, thanks. Now it works again duh
Anna Lear is on the case.
19:23
yay
dang what works best for a headcold? the most powerful thing legal in the US .... hopefully that will knock me unconcious as well
btw, this also happens on my mobile, i suppose it auto-switches to mobile mode there
throat hurts ... sinuses feel like they might rupture .... just want sleep
I so wish my co-workers hadnt fucked up and created a huge bug that I am now fixing and cant affort to leave it till next week
Just go home. Let he who fucked it up fix it.
I cannot ... then it wont get done ... i am the only one with the knowledge of the build or something
but apparently not very well since its taken a few hours already and still no working build :(
19:28
That viewpoint is so alien to me. When I'm sick, there is literally nothing that can make me stay at work.
If I'm the only person that can do X, that's too bad, X will remain un-X'ed.
@JoranBeasley: you seriously need to work on that bus factor issue then.
Maybe it's different for small companies? Me taking a week off will have little effect on BigCorp's bottom line.
/me adds "manager can't guilt you with 'the company will literally die if you go home early'" to the "pros" list of working at a big company
yeah I agree... we are trying but right now our build process sucks :(
we arent that small ... but no one can use our devices ... because we broke our driver ... so its a pretty big deal
You know what would really motivate them to fix the build process? If you stayed home for the next ten days.
lol
I told em Im giving myself a half hour more to fix it ... if its not working then Im just gonna go home and deal with it next week
hopefully the sky doesnt fall
19:41
Is your issue anything some strangers on the internet can help you with?
nope
not likely ... is basically a less than perfect build process ...
and my brain not working 100% today ....
ahh I think i got it
nailed it
see you guys later
DSM
DSM
20:00
@Kevin: it'll overflow in Python 2 if the number is really big, but if the number is really big we should be using an inclusion-exclusion formula anyhow.
I'm confused. Why is Two Bit Alchemist acting like long ints don't exist in Python 2?
>>> sum(x for x in xrange(1, 10**6) if x % 3 == 0)
166666833333L
DSM
DSM
I think 2BA is thinking of this:
>>> xrange(1,10**20)
Traceback (most recent call last):
  File "<ipython-input-1-89eac6e79119>", line 1, in <module>
    xrange(1,10**20)
OverflowError: Python int too large to convert to C long
but really the problem seems to be just that it's really slow.
(From the OP's "it's still going" comment.)
ok
DSM
DSM
.. and the OP has now changed the code from xrange to range, so I'm no longer believing anything the OP says.
Of course, the actual solution to the problem can be calculated in O(1), on paper even.
DSM
DSM
20:05
:-) See above, "we should be using an inclusion-exclusion formula anyhow."
I assume that's fancy talk for "all the multiples of 3 plus all the multiples of 5 minus all the multiples of 15"
DSM
DSM
Yeah, it's how we all-star mathletes use jargon to separate ourselves from the common players.
"as codewars didn't like my solution": and now we're not even running code on a real interpreter.
I gave him a hint, but I'm not hopeful
20:15
Much pity for this guy. "All I want to do is [immensely difficult thing]"
175 rep
if I don't get 200 I quit so :D
Second only to the guy whose boss tells him: "All I want you to do is [immensely difficult, maybe impossible thing]"
(and there is much rejoicing)
DSM
DSM
That topic has come up a few times, i18n of keywords I mean. It's not crazy to want it, but I don't know how much my scepticism of the net benefits is affected by the fact I speak English and it's basically won the field.
Adam Smith pretty much nailed it. Even if you did translate the language, all of the documentation and support resources are in English.
DSM
DSM
20:21
Bad idea of the day: "I suggest using regex to parse your own program with another program"
I guess it still might be useful to train up a workforce of Ibo-speaking people, even if they can't get much beyond basic text processing.
Beats having no programming ability at all
@Kevin I never ever suggested to watch it in the first place
:)
Hmm, how the heck did it get on my list...
when I write @Kevin's list.remove(<title>) it means, you don't even want to read about that movie what so ever
@Kevin I have no idea :P
Search isn't helping me here, as it only shows three messages
20:25
@Kevin easier to teach the few keywords to the Igboists in English, though
@Kevin:
Oct 2 '14 at 22:27, by Peter Varo
@Kevin's list.remove(Snowpiercer)
next line:
Oct 2 '14 at 22:27, by Peter Varo
(I don't know if it was already in there, if wasn't catch the ValueError)
snowpiercer good?
Zero's opinion:
Oct 2 '14 at 22:39, by Zero Piraeus
@PeterVaro Haha yes, that was one godawful piece of crap.
Of the six times it's been mentioned by name in chat up until now, we have three negative responses, one positive, and two neutral
the positive one was from Tristan so it might be sarcasm
user559633
user559633
20:27
snowpiercer was very good
sure it was.
user559633
No, really. Go in expecting an action film and you'll be satisfied.
so: expecting an action film == don't expect anything at all.. is that right? ;P
user559633
Yes, fair. It's clever for an action film, but make sure to keep your suspension of disbelief
20:30
:D
anyway, it's time for me to search something to watch
ah, one more thing:
@Kevin's list.remove(The Theory of Everything)
(also catch the error if it wasn't there already)
cbg(@Ffisegydd) and rbrb(all)

« first day (1581 days earlier)      last day (3593 days later) »