« first day (2207 days earlier)      last day (2966 days later) » 

user6568562
00:09
Laters everybody [ :*
?
That was my suspicion. Boy you have a typo problem:D
good night:)
 
1 hour later…
01:33
rhubarb
 
3 hours later…
04:49
cbg
Cabbage :-)
 
3 hours later…
07:39
pycon.fi cbg
08:10
Hi , Can every recursive problem can be solved by iteration ?
Cabbage
@johnsmith Yes, but in some case that may amount to "manually" implementing the recursion using your own stack.
Back in the Bad Old Days, many languages did not (directly) support recursion. Writing something like Quicksort in BASIC was a fun exercise.
best library for scraping?
cbg
@PM2Ring Thanks .Is there a problem where it is very hard to implement iteration ? I find it easier to implement iteration than recursion
cabbage y'all
@johnsmith In Python, it's a good idea to avoid recursion unless you really need it (eg for dealing with recursive data structures, like trees). Python limits the depth of recursive calls. The default depth is 1000, and that's generally more than enough for most applications, and you can modify that limit if it's not enough. Also, Python cannot do tail call elimination, so a recursive solution that would be ok in C may be very inefficient in Python.
08:22
@SohaibAsif the best not sure, but it should do what you want scrapy.org
@johnsmith Try implementing Quicksort without recursion. And if you can do that, try creating and traversing a binary search tree. I think you'll agree that the recursive versions are easier to write and to read.
@AndyK thanks i will start learning scrapy
hey
08:54
Cbg
@idjaw The badge for self-deleting a post with score of -3 or lower is Peer Pressure. Disciplined is for deleting a post with a score of +3 or higher.
@PM2Ring does it in CPS
09:09
@RobertGrant CPS == Continuation-passing style? That sounds vaguely familiar...
@PM2Ring callbacks
@FlorianMargaine Ok
09:41
ffuu idiots
certbot / letsencrypt infra is Python 2 only
I HATE YOU
09:52
Yeah I was a bit disappointed with that
10:03
I'm trying to find a good question that talks about errors due to newline translation when copying data in binary files that were opened in text mode.
cbg, all
Thinking about replacing our devops tooling with "make"
What tooling is that?
@holdenweb doit.
I use makefiles.
Jenkins and ansible with a shitpile of YAML files that nobody seems to understand
Ah okay
Jenkins is nice for us because it's a place you can go and see builds - would you replace that with something else or do away with it?
10:15
Way over-complicated for our current system, and as every release proves, a maintenance nightmare.
(Sorry for questions - I'm trying to think about this stuff for here as well)
We would probably continue to use Jenkins, but throw most of the Ansible stuff away, I'm guessing
@holdenweb what does your devops stuff do?
All kinds of stuff - automated tests after PRs and so on - I can lice with most of that - and deployment. But all the deployment stuff is written to optimise things (install this if it isn't yet installed, etc.) when I believe it could probably be done way more simply by starting with a new virtual and using a more-or-less linear script
10:31
cbg
Asparagus
do someone have any idea about pandas library
Pandas' libraries only hold photographs in black and white. You heard it here first.
Is there something of a smell in this room? Thought it might be garlic ...
10:52
cbg
o/ @IljaEverilä
11:13
@holdenweb fair enough
cbg
beating my head to the keyboard, trying to understand the functional python magics @IljaEverilä left us with.
They shouldn't be that magic :(
\o @heather
11:45
user image
10
brief cbg
@AndrasDeak, cbg
@PeterVaro sometimes it's beneficial to have a liberal arts major girlfriend, eh?:D
:D :D :D
OMG...
Python pitfalls @pycon.fi
presenter says that print 'foo',prints space at the end. Solution: use sys.stdout.write()
11:52
nice guerilla marketing, Antti;)
pycon.fi: server not found
you're not very good at marketing, are you?:P
A search for "haapala" on the talks page yields no results. What gives?
I got TIS-100 to try out that style of game. I also bought it with Stardew Valley because it made TIS-100 cheaper. Then i put in 29 hours of gameplay over the weekend on Stardew Valley. Help
@AndrasDeak fi.pycon.org
@AnttiHaapala Thats a dumb thing to do.
@GamesBrainiac You don't need to tell Antti that. :)
it was a South Asian guy giving that pres, guy was allocated 1 hour but the whole thing took 25 minutes :)
12:02
Ever thought of doing a blog called Antti Patterns?
@PM2Ring .... that is the name of my company...
Excellent
cbg, this program works in my linux mint box but for some reason will not print the "totalMessage" bit to the server when run in windows: pastebin.com/QPgzBgvQ, pastebin.com/PKhiGnMq
@PM2Ring if you google that you'd find out where to send drones to kill me :D
12:05
@AnttiHaapala amazing
@AnttiHaapala You have a typo: "I will gladly provide the you following services" -> "I will gladly provide you the following services"
@PM2Ring still:D:D:D
I thought I fixed that 3 years ago :d
Also "conserning" -> "concerning"
no, I need a new home page
yes that too :D:D:D
perhaps I will fix them now
If you're not editing your web page in production using vim, you're not all I'd hoped you would be
12:08
it is google sites :P
I spent max 5 minutes on that
lol ... it seems I have a problem
I cannot find the account for that site anywhere
Well if what Im doing won't work in Win it probably won't work in android which is what Im aiming for
@AnttiHaapala just contact Google customer services - they're pretty responsive
(Seriously, use Bitbucket + Bitbucket Sites + CloudFlare or something - really easy to set up and full control)
Or Github Pages instead of Bitbucket, if you already use that
done
@RobertGrant I will do pyramid :D
Haha fair :)
anyway I guess I fixed my site now :D
at last
12:24
@Dominico909 Just a guess: Make sure your text lines end in \n or perhaps \r\n.
BTW, using un-named except: is not a good idea; except: pass is the Python equivalent of sticking your fingers in your ears and saying "Lalala, I can't hear you!"
@PM2Ring or how about... the black knight :D
@AnttiHaapala Almost. "I will gladly provide you the following services:"
@AnttiHaapala It's just a flesh wound!
as if I read that :D
12:26
@PM2Ring what would making them go to a new line do? How would I change the except to make it more pythonic?
@Dominico909 do something with the exception instead of ignoring it, he's saying
@Dominico909 If you're sending text to a line-buffered interface it may not render the text until it gets a whole line.
Also, Windows expects \r\n = CRLF line endings, Linux & Android just use a plain \n = LF
@PM2Ring Ah, so at s.sendto I shoulda add \r\n?
@Dominico909 The string totalMessage does not appear anywhere in your pastebin post. Wrong code?
Doesn't python translate \n into the correct separator for the system?
12:29
In text mode , yes
In binary mode, no
And naturally when \n is the platform line ending, it makes no difference
@holdenweb There are 2 pastebin links
@holdenweb Yes wrong code one second, thank you
no its there
my bad again
Whenever the question is "why is my program silently failing to do what I want?", the first thing to check is "do you have any try-excepts that are silently ignoring exceptions?"
12:32
But I don't get an error, so what would I do with the except?
@Dominico909 Give it a try & see what happens! As I said, I'm just guessing, I haven't played with sockets much, and that was a while ago.
Are you saying "I don't get an error with the code as it is"? Well, yeah, because you're catching and discarding it. Or are you saying "even if I remove the except, I still don't get an error"? In which case, the except isn't the problem.
@PM2Ring Ok ill do that and let you know
@Kevin So I should try by just removing the excepts?
Yeah.
@AnttiHaapala I like it how "OY!" is part of the company name
12:34
With non-blocking sockets you might easily get an exception on a recv when no data was available, for example. You definitely want to hear about exceptions!
aah I got -- line 16, in receiving
data, addr = sock.recvfrom(1024)
BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately
Once your program crashes on them you can refactor to handle them
chalks up another remote psychic debugging score
@Dominico909 If you can guarantee that the code inside the try block will never raise an error, then the try is pointless. If it can raise an error, then you you should be specifically catching that error (or errors) by name in your except clause.
@holdenweb Well done!
@PM2Ring So I should add the BlockingIOError to the exception? After that is done what should be the statement after the colon?
@AndrasDeak if it were a public company it would be even better: "Oyj!"
12:38
:D
it is OK to catch everything, but no OK to catch everything and ignore.
after how much time we can post the question here
i am not getting any answers
@SohaibAsif depends, usually 2 days
@Dominico909 This code will print the error message and then proceed. You probably want to do more than this.
except BlockingIOError as e:
    print(e)
In reading the code for the receiving thread I was struck by how it will continue to cycle around in an infinite loop. I'm not even sure why that thread needs to be non-blocking, since only the server will ever send ot it
12:39
I'm well confused now
It would be much simpler just to rewrite it in blocking mode: then it just has to receive packets in a while True loop and break on a quit packet from the server.
@SohaibAsif the error is that your module is named csv.py which is the same name as the Python internal csv module that pandas uses. rename your csv.py to somethingelse.py and it will work.
@PM2Ring that code just infinitely printed [WinError 10035] A non-blocking socket operation could not be completed immediately
@holdenweb or a timeout I guess?
@Dominico909 the thing is, Windows keeps telling you there are no waiting packets, and you keep asking it. It's a bit like a kid in the back seat of the car incessantly asking "are we there yet?"
12:42
@holdenweb or a project manager
Why a timeout? You just have to start waiting for another packet when you DO time out
@AnttiHaapala renamed the module but did not work i am damn sure my code is correct but still getting errors
"get errors" but get the *same errors"
@holdenweb I have no idea how I would fix that. I'm really new to this so not sure how to adjust the code accordingly.
@SohaibAsif now's the time to raise the bar on things you're sure of
12:43
So the code loops round, gobbling CPU whenever the thread runs, and once in maybe a million executions of the loop there is something to print.
also make sure that there is no csv.pyc file hidden
@SohaibAsif The exact same error you got before? Or something different?
@holdenweb Can confirm just checked cpu after running code it was at full throttle :P
I presume you copied some code that used s.setblocking(0)? You should perhaps learn exactly what that means. This will lead you to blocking operations - essentially, they just stop until something happens, after which they carry on. It then becomes like reading a file
user6568562
Cbg die welt
12:45
cbg
@holdenweb yep, used a web tutorial to make it
user6568562
Hey @holdenweb How's the recruitment going [ : ?
hire me
let's see...
user6568562
Yo khajvah [ :
12:46
The best place to learn about socket timeouts and modes is the documentation
I make good coffee
guy is giving a presentation about let's encrypt,
and let's encrypt is down right now :D
cbg room6
@randomhopeful slowly, since you ask
@AnttiHaapala deleted the pyc run the code but still same problem
can anyone test that code on their machine
user6568562
12:47
@AnttiHaapala Beats having no pants, I guess
you cannot have the same problem if you don't have csv.pyc/py any longer.
a really good TED talk spoof -> digg.com/video/ted-talk-parody
@holdenweb Ill look through it but understand very little hehe. Hopefully I can find my issue somewhere in here
> digg.com
user6568562
@holdenweb I can imagine. Quality is a bitch to find : \ I'm sure all will be well in due time
12:48
Now that's a name I've not heard in a long time
i wish i could post the error here
but em not allowed
i know
Stick it in a pastebin
@holdenweb on a serious note, are you looking for Python programmers?
the room rules
If you're talking about the "no talking about a recently asked question" rule, that doesn't apply if room regulars are already engaging you about your question
12:51
@SohaibAsif bpaste.net and python 3 traceback
If you're talking about the "no pasting in really long code/errors" rule, use an external paste site and provide a link
thus: different error
Looks like it's getting a None when it expects a dict. Malformed input json, maybe?
@khajvah yup. Here's our SO company page
12:54
@Kevin yep
Naughty pandas, not providing a nicer error message
@holdenweb can foreigners apply?
I heard it's a problem in UK
Yes, but there may be an extended visa process. We have offered employment to a foreign national, and it appears it could take us a total of about eight weeks to finally get him on board.
@Kevin any instructions for me :(
@holdenweb I will put together a resume and apply
12:57
@SohaibAsif Edit data.json so it only contains a very small amount of data. Perhaps [1,2,3]. Then see if you get the same error.
user6568562
How scared of json should I be on a 1 to 10 scale ? I'm so relieved that I managed to fully understand why I will never need parallelism in my lifetime. Still I feel there is a lot of remaining windmills to make enemies out of
(I'm assuming that pandas.read_json can parse any kind of json, and isn't expecting some specific data type like a dict-of-lists-of-ints or something. I don't know if this is actually the case, as I have never used pandas)
@randomhopeful 1
@randomhopeful who told you that you'll never need parallelism?:P
@Kevin It's a recent question, Antti just hammered it (with idjaw's canonical) stackoverflow.com/questions/40341333/…
12:59
Json is nothing more than a human-readable data serialization format. There are questions about it on SO every day, not because it is difficult, but because lots and lots of people use it all the time, so mistakes are inevitable even if they're rare.

« first day (2207 days earlier)      last day (2966 days later) »