« first day (1438 days earlier)      last day (3521 days later) » 
03:00 - 15:0015:00 - 00:00

user559633
3:00 PM
hope you like typing
 
Umm... I've ever made a good answer or a crap one, and not sure which one... just slightly worried I can't see similar suggestions on the site... which kind of makes me wonder if it's dumb
@tristan typing.... it's more if he likes headaches, screaming and blood coming from his eyes isn't it? :)
 
I mostly just look up things and think "oh... wait, why? It shouldn't be this difficult to do this"
 
user559633
i don't "get" java
 
DSM
This is Java. There is no why. You simply find how things are done and do it that way. Sure, you can start asking questions, but then six hours later you still won't understand and your code won't be any closer to done.
 
user559633
yeah, assembly line programming
 
DSM
3:06 PM
(I'm working on Java code on one screen at the moment, so I might be a little unreasonable.)
 
import java.util.Scanner
class Blah() {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    System.out.print('please enter some string: ');
    user_input = s.nextLine();
  }
}
vs
user_input = input('please enter a string: ')
 
Too bad Python doesn't come bundled with gcc. Downloading a 3.3GB VS 2008 iso just to be able to use setuptools on 64 bit Windows with 64 bit Python is kind of absurd. — tponthieux Jun 8 '12 at 21:54
Can we serialize the state of a generator?
Thanks, this is almost what I need. The remaining question is how to save the state (let's say if I run the app for first 10 attempts, then close it and then would like to run it again)? — LA_ 1 min ago
 
user559633
Why would Python come with GCC? Sorry about your OS.
 
DSM
@thefourtheye: AFAIK, not natively, although there's probably a library out there with the necessary hacks. Might as well bump it up to a class.
 
I wonder if it is even possible.... what if the generator has an active DB connection or a open file?
 
DSM
3:22 PM
Sure, but that applies to any object rich enough to contain possibly unserializable content, not only generators.
 
But if it is a class, we get to choose which members to serialize, right?
 
DSM
Yep, typically via the [gs]etstate methods.
 
@thefourtheye looks like you can just treat it as a len(charset) base number
 
Oh yeah, I ll suggest that as well. Thanks Jon :)
 
Imagine if A is 1, Z is 26, then if you start from one, stop at 27, that's AA... store that or 27
then you translate back and continue to 28 to resume the sequence :)
Means you can also multiprocess it out to different "ranges" :)
 
DSM
3:28 PM
I think I've implemented that Excel-style counting more than once on SO..
I wonder if it's a homework problem somewhere.
 
I am a little confused now, isn't this what you suggested?
def bruteforce(charset):
    for candidate in itertools.product(charset, repeat=len(charset)):
        yield ''.join(candidate)
16
Q: Why can't generators be pickled?

RadimPython's pickle (I'm talking standard Python 2.5/2.6/2.7 here) cannot pickle locks, file objects etc. It also cannot pickle generators and lambda expressions (or any other anonymous code), because the pickle really only stores name references. In case of locks and OS-dependent features, the re...

5
Q: Can a Python generator be easily saved and reloaded from disk?

Robert OschlerIs there a way to serialize a generator, current state and all (local variables, etc), so that you can load the string containing the serialized generator later and be able to pick up right from where the last yield statement exited the function? If yes and you know of a web page with a code sam...

 
Is it just me, or are there more <20 users joining lately?
 
DSM
How do you tell? Are they the ones without avatars? (I didn't think that passed.)
 
yeah, the grey blobs
 
@davidism conversation's also a little down... but still not bad
 
3:36 PM
Confirmation* bias possibly. You wouldn't have been able to tell the difference previously and now you can it's obvious.
* not sure if it's actually confirmation bias or some other form of bias.
 
DSM
The other day we had an absurd number of regulars in the room simultaneously. Weirded me out a little.
 
@thefourtheye well... in your OPs use case... you can mathematically calculate the key space...
 
Oh yeah, that makes sense. It's only noticable now.
 
3:58 PM
so. Think I can probably list that I am mediocre at python on my resume honestly?
 
DSM
No.
me·di·o·creˌ mēdēˈōkər/ adjective: of only moderate quality; not very good.
 
:( I have no idea what I am doing
 
DSM
Yes, you do.
As evidenced by your ability to achieve things.
 
1. Yes you do. 2. If 1. is False then at least you understand that you don't know as much as you'd like and you try to do your best/improve your knowledge.
 
@thefourtheye something like this is what I had in mind - then all you need to do is store an int :)
 
4:03 PM
We can't all be Martijn...some people have to be Jon...
 
DSM
@Jon: why no aa?
 
runs away
 
@DSM Because I didn't test it properly... it's more a "here's the idea"
 
The Dunning–Kruger effect is a cognitive bias manifesting in unskilled individuals suffering from illusory superiority, mistakenly rating their ability much higher than is accurate. This bias is attributed to a metacognitive inability of the unskilled to recognize their ineptitude. Conversely, people with true ability tend to underestimate their relative competence based on the erroneous or exaggerated claims made by unskilled people. David Dunning and Justin Kruger of Cornell University conclude, "the miscalibration of the incompetent stems from an error about the self, whereas the miscalibration...
 
It's bias day today.
 
4:04 PM
@davidism I love how that gets mentioned here every few months :)
 
DSM
@davidism: good pull!
 
@Ffisegydd it's a normal day, you're just biased :P
 
Ooooh yooooou!
 
That page is so relevant to the SO experience.
And to my experience dealing with the people the government seems to find to bother me at work.
 
trying to learn something always puts into perspective how much there is still to learn
 
DSM
4:09 PM
The size of what remains doesn't diminish the size of what's already done.
 
I think when people hit a wall in any skill, they generally start generating their own content, which is endless in and of itself
 
What's your favorite python version?
 
@crapoverflow curry flavoured :)
 
DSM
At least on Fridays.
 
@JonClements No vanilla? :(
 
4:16 PM
vanilla ice cream with chocolate and toffee sauce for dessert - definitely :)
 
mmmm.... nice!
Python steak is the best. It's quasi-boneless too!
 
Talking of food... rbrb for a bit :)
 
Okay that didn't come out right
 
markdown removes consecutive spaces, I believe.
Not a very friendly environment for ascii art
 
If anyone's wondering, it's an ASCII fractal explorer I just made in C++
It was a mandelbrot.
was
 
4:29 PM
Maybe if you used the "fixed font" option...
 
How?
 
paste a multi-line message into the chat box. A "fixed font" button appears after "upload". click the button.
 
Oh, lets try that
 
alternatively, highlight the message and press ctrl-K. alternatively, manually insert four spaces at the beginning of every line.
 
                                             .
                                              . *.
                                               *
                                              ..
                                             *.**
                                           . .##.
                                          ...###...
                                           +######.
                                          +*######.
                                           #######.
That's one fat mandelbrot
Thanks, kevin
 
4:32 PM
Yeah, the aspect ratio for fixed width characters is usually like 5:8
 
lets zoom in a bit?
 
So it ends up stretched
1 message moved to recycle bin
 
                    .
                        .

                        ..            .
                          ...       .
                             .     .
                              ..  .
                                ..
                                .
                                .
                                ..
                                ..
                                 .
                                 ..
                                 *
                               ...
 
Fractals are neat.
 
Here's a julia
                              .
                               +
                               *
                               ...
        . .                  *.**+.
         .*.    **            .****
          .* + *#.     * *   .*.*..
         ...*.....      ***  ...*.*.
        *.**+*...       .........
     .  ..**+*.*+   .   ...*.....
   . .* *.*+***.*. ..+*...**...*+
    **....*****......*..*...*...*
    **....*.*+......**..+*****.*...*
   *.... ......*........*****+**...*
   . .   ....**#.......******+**....
Why is python so slow compared to C++, I made a similar fractal explorer in Python but it takes 5 seconds at least to draw whereas in C++ it's done in an instant.
 
4:40 PM
Generally speaking, compiled languages are faster than interpreted ones.
C++ gets translated straight to machine code by its compiler. Running a C++ executable is practically feeding instructions straight into the CPU.
 
I wish C++ also had an eval function...
 
Python compiles to an intermediary bytecode, which is then read by an interpreter, which is written in C. That's an extra layer of indirection, which introduces some slowdown.
 
Otherwise I have to change the code to edit the equation of the fractal, whereas python could directly take it from the user
 
Not to mention the languages simply have different goals, ex. Python wants memory management to be so easy as to be invisible; you trade speed for simplicity as a result
 
Agreed, Python is very intuitive
 
DSM
4:45 PM
In C++ I've used muparser when I've wanted relatively straightforward runtime-specified functions.
There are probably other tools which do the same thing.
 
You could write a miniature interpreter in C++ that can evaluate equations passed to it from the user. But then you've got that "indirection slowdown" problem (although probably not at the magnitude that you experience it in Python)
 
Well, forget that. I am kind of done with fractals... I've made at least 12 programs in 2 languages... I wanna try something new. Something visual too... Any ideas?
 
Replicate this bezier curve animation.
 
This seems nice
The lines seem to be moving linearly on each other...
Shouldn't be too hard to make I suppose.
I meant that their endpoints are moving linearly on their "parent" line segment
I am gonna try this in pygame
What if the user can specify the points of the original line segments? That would be a fun feature
 
5:01 PM
Yep.
 
Extra credit: allow bezier curves that have any number of control points. Ex. the first gif has five, and that one has six.
 
Yeah that's what I was thinking
Well, it's almost 11 pm here... I better sleep. I will definitely try this tomorrow... Bye everybody!
 
DSM
rhubarb, as we say around here.
 
5:32 PM
cbg once more dearest e-friends.
 
5:50 PM
Anyone with some knowledge about django-rest-framework
 
6:20 PM
Woo hoo managed to break the 2000 place barrier in the Kaggle comp.
 
user559633
6:44 PM
pythoooon i missss youuuuuu
 
user559633
this has been the ghost of tristan's productivity since switching to writing in C
 
7:25 PM
Whew, my big project is finished and checked in. Now to relax a bit, before the bug reports and "this isn't what I wanted" emails from the client
I'm expecting to get "this output looks different!". Tearing out the guts of a pdf rendering system and reimplementing it with a completely different technology makes the output look different? You don't say!
 
We have a 1-2 week phase where the code is on a preview server, and each bug and feature must be marked "ok" before going to production, and we still have to release a bunch of hotfixes right after a release.
People will literally mark something as good, then as soon as it gets on production say "that's not right at all".
 
While we do have a testing server, when I checked in one incomplete segment of the new code this morning, my boss came in half an hour later and said "your code isn't working in production". So I guess we're in a big hurry!
 
It took us forever to train the right people to (a) test stuff on qa while (b) not confusing it with production.
 
cabbage
unicode is driving me crazy.
 
DSM
@Ffisegydd: >2k congrats!
 
7:35 PM
@davidism @Kevin similar thing: I've written papers before now and then given them to my supervisor to proof-read/get his approval from. He has made suggestions on how it could be improved/errors/etc. I've made these and then given it to him again for the final look through. He's then given me new suggestions changing it back to how it was. And I don't mean "Oh yeah just put that bit back how it was" I mean "Oh no this is all wrong, it has to be like X!" with him not realising...
 
DSM
@abhi: anything in particular?
 
Gotta dodge those change suggestions by employing a duck
 
@DSM Yes, Pydev randomly changes the encoding on the file.
 
(jeers on Jeff for not having a link that goes directly to the entry in question. Scroll down to #5)
 
now i Have UTF16 BOM markers.
so I delete the file and copy the text into notepad
on windows.
then I paste it back into pydev
new file, but same name.
Guess what same problem
everything is UTF-8 so why does this file have a BOM - UTF 16 marker in it, is beyond my comprehension.
I am ready to swing a baseball bat at my laptop, if that would make things better.
Also, there is a #coding:utf-8 at the top of the file.
I was told it was necessary to include this in code
I am comparing regular strings with unicode strings in my code.
but the error occurs on pyDev
then pyDev inserts empty square blocks in my code.
very annoying
 
DSM
7:40 PM
Unfortunately my windows knowledge is weak and I don't use PyDev. My files tend to stay the way I put them. :-/
 
I feel bad for you son, I got 99 problems but encoding ain't one
 
Son?? I am old enough to have fathered 3 kids your age by now. :-)
 
:-)
Just a figure of speech.
 
i wrote some test scripts using python, but my supervisor wants me to rewrite them in c#
 
DSM
7:43 PM
Speaking of random hip-hop references, I saw someone with a Wu-Tang hat on the other day. Kid wasn't even born when Enter the Wu-Tang came out, and then I realized how old I must be.
 
I'm trying not to think about the inevitable march of time at the moment
Except perhaps the march towards quitting time
 
sometime in the 90s I suppose, the Wu-Tang happened.
 
I don't know anything about Wu Tang, except that they have a secret. I must learn this secret.
 
DSM
Careful. It's 36 styles of danger. "Here lies Kevin "Starbait" Kevinson. He wanted to learn the secret."
 
Is this one of those "we'll kill you so you don't find out" secrets, or "we could tell you, but then we'd have to kill you"?
If it's the latter, please send a Wu Tang representative to my deathbed in ~50 years, so he can tell me the secret and switch off my respirator.
 
DSM
7:51 PM
"Well," Kevin thought to himself, as his friends and family watched the stranger leave, "that was somewhat disappointing."
 
With modern medicine, you won't be dead for another 100 years or so.
 
user559633
that's not how that works
 
Can AI's die?
 
Depends on the definition of "die"
You can drown virtual people in The Sims
 
user559633
can AI's die what? finish your sentence
 
7:56 PM
Can AI's die be rolled to determine how much damage the goblin takes?
 
user559633
can AI's die overheat?
 
Dang AI always slowing down combat
 
@abhi I dont think fathering 3 kids of a single age requires you to be any older than fathering 1 kid of that same age
 
DSM
@Kevin: aargh, I was going to make a "roll a four" joke.
Well, "joke".
 
@Humdinger I should have put past your age in the line.
 
7:57 PM
A PC that always rolls a four would have a pretty good build as a rogue specializing in darts. 1d4 per dart, 4 per round, plus extras for feats.
 
@abhi I still dont think the number 3 adds any relevance to your sentence at all.
After all you could father 3 kids in one day
 
"Fathered 3 kids [serially]"
The first one has to cease being a kid before continuing with the next ;-)
 
user559633
forking is expensive
 
What about knifing?
 
waits for someone to make spooning reference
 
8:01 PM
After a knifing joke, the spooning joke is just dead. Plus everyone runs faster with a knife!
 
Incidentally based on your blog and some rough calculations you'd have had to have been 11 or so when you fathered the children for them to be Kevin's age. </stalker>
Which is technically possible I suppose, if you were an early bloomer.
 
And if you take his wanted meaning of 3 kids (probably a year apart) all older than kevin, it would have been around 8 when he started
Which apparently would be possible with a condition called Precocious Puberty
 
8:30 PM
@Ffisegydd - from my blog, how did you arrive at my age? curious
 
I have been programming since 1989 (Eighth Grade) and so I decided to start a blog about it.
Not sure what Eighth Grade is age-wise but let's assume 13?
Therefore your were born 1976
 
but i could have been 20 years old in eighth grade.
;-)
 
:P I made the assumption that you were not.
 
@Ffisegydd You're close but not accurate. I turn 40 this year.
So if I had started when 18, I would have had at least 1 kid who is 22 years old.
 
Kevin is older than 22 but yeah it's just about doable.
 
8:33 PM
I don't know his exact age, but he's in his twenties from what I recall.
 
Yeah I believe so.
Though I believe he's older or same age as me and I'm 25.
 
17
Q: Why is gold golden?

tschoppiBulk gold has a very characteristic warm yellow shine to it, whereas almost all other metals have a grey or silvery color. Where does this come from? I have heard that this property arises from relativistic effects, and I assume that it has to do with some distinct electronic transition energies...

 
Apparently @Ffisegydd is a mix of Kevin Mitnick and Sherlock Holmes. We are all doomed!
 
@abhi Gold is actually purple if thin enough (i.e. when there's only a few layers of atoms)
And then as you add more and more layers it eventually turns "gold"
 
if it is purple,then it must be impure.
pure gold is golden in color.
then when you start making ornaments and introduce copper it changes color.
 
8:36 PM
Purple is the standard color for pure and noble..
 
but copper is necessary to give gold a backbone.
 
No I'm talking about when you only have a few layers of atoms, it's purple.
 
and actually other metals are not "gray" nor "silver"
 
@PeterVaro Yes. Copper is definitely red.
 
they have green, blue, graphite and other amazing colors
 
8:38 PM
Not bright red, but reddish tinge.
 
even silver-steel can have any color based on the heat it gets
 
user559633
but what color is copper?
 
Copper is a shade of red.
 
copper is copper-colored, gold is gold-colored, tristan is tristan-colored, and green is the best color
 
Wat. Blue is clearly the best colour.
 
8:41 PM
Right, but green is the best col o r.
 
...I am willing to accept these terms.
 
@davidism I would say ultra violet is "literally" the most super color
as it is above all ;)
 
user559633
i'm going to vio*let* that one go
 
Xrays are the best colour. I'm partial to 0.5 Å myself.
 
ultra violet is above xray, IIRC @Ffisegydd
oups -- mea culpa -- sorry
 
user559633
8:46 PM
yeah @Ffisegydd what do you know about science anyway
 
those are the gamma rays
 
;_;
 
user559633
gamma gamma gamma gammameleon
 
user559633
(you make things glow, you make things glowwwwwwewwwooooo)
 
8:50 PM
Anyone here pre-order the iPhone6?
 
user559633
i am the iphone6
 
The people waiting in line look so excited to get their new phones: youtube.com/watch?v=Ef_BznBwktw
 
no, but "I know a guy from budapest who did":
 
one friend of mine commented on that. he said "the iPHone is the greatest thing since sliced bread."
 
haven't seen the new design until now, but it looks surprisingly like the samsung galaxy phones
The old designs, not the new ones. As in Apple looks like they're copying Samsung now.
 
user559633
8:55 PM
i have an iphone 4
 
user559633
it's a pretty good phone
 
yeah, but sadly samsung can't copy apple and sue them
cos apple came up with that idea first suing other companies
 
user559633
let's not do this again, i will literally fall asleep and die, literally out of boredom
 
Let's do it. I want to see if we can make him die from boredom.
Incidentally, I totes love android <3
 
user559633
fartt consumer electronic is different than other consumer electronic this is somehow something people are willing to talk about at great length farrrt
 
9:29 PM
afternoon folks
 
user559633
yo
 
10:51 PM
is OAuth with any service provider more or less the same code?
 
11:14 PM
Yes.
Why exactly should I have a license for my open source project? Like, if I don’t care about getting "credit", why should I still have a license?
(this is purely educational and I dont actually have a project, I just want to learn more about what a license actually buys me, or what not having one sets me up for)
 
03:00 - 15:0015:00 - 00:00

« first day (1438 days earlier)      last day (3521 days later) »