« first day (1283 days earlier)      last day (3683 days later) » 

Sab
6:00 PM
Aha.
One thing that bugs me is, why can't several returns be used in a functions?
I tried it once and it just stopped at the first return.
 
It's a standard design pattern, can't remember the name of it
 
Sab
Let's say I got like 5 different variables to return, how do I do that?
 
Return it in a tuple
 
Sab
Aha
But wait
 
Then a = func(x) and then a[0] is your first variable etc
 
Sab
6:02 PM
tuple = (1,2,3,4,5)
return(tuple)
is that correct?
 
Yes though don't call it tuple
 
Sab
Then basically what you just said
What do you call it>
 
You could also do a, b, c, d, e = func(x)
 
@Ffisegydd MVC
 
Sab
Ya
 
6:04 PM
Call it anything but tuple. Otherwise you override the builtin.
 
Sab
But what exactly is a tuple then?
 
You can just do return (1,2,3,4,5), by the way. You don't need an intermediary tuple variable or anything.
 
Sab
Ohhh
it's a reserved
Aha
 
An immutable container. Google for more info. Hard to type much on my phone :p
 
Sab
Thanks. I'll google it
The most important part is the name, so i can read more :D
I need to find a library to do the visual
 
6:07 PM
Pygame possibly
Peter may know more visual based libraries.
 
Sab
PIL seems to be the one, but the problem is, it's not available for 3.X
 
Look into pillow. It works on both 2 and 3
 
Sab
Oh man. This is driving me restless. It's so interesting it annoys me.
 
Seems similar to pil
 
Sab
Lemme check this out
If I get to do a final year project this year, L-system it is. But I don't think they give first years a final project to do
 
6:14 PM
Not typically no. There might be a smaller project for a module though
But not one big project
 
Sab
Ya according to the prof we will get to make a game as part of the assignment
That will be tough I guess. Last year they got to make a sudoku solver
 
What subject?
 
Sab
Com sci.
First year first sem.
2nd semester is Java
 
Eww
 
Sab
But the l-system gave me loads of practice and increased my problem solving skill. Just by doing that, I did my last assignment faster and my code looked better.
Why Eww? :P
 
6:17 PM
Java :p
 
Sab
Apparently loads of people in my class love it
thought I never programmed in thast before
or programmed in any serious language before
I did some PHP but it's not like Python in term of elegance.
 
Java has a fairly different philosophy from Python.
Things that are easy here, are hard there (and vice versa, although we'll never admit that outside of parenthetical asides!)
 
Sab
From what I read Java is like "write once and run on all machines"
 
Yeah, but "write once" is the hard part ;-)
 
Sab
Aha
I like Python because of it's simplicity.
I took a quick look at Lisp and the style looks the same
nothing like code between {}
 
6:20 PM
Python does print "Hello, World!". Java does public static class Main{ public static void main(int argc, char[] argv){System.IO.println("Hello, world!");}}
 
Sab
Exactly lol
 
Or something like it. I'm writing from memory here.
 
Sab
all i know about java is
private void something(){}
because I happened to look at a piece of code lol
 
That line could be from any number of languages, really. We just like to pick on Java specifically because it's so popular.
 
Sab
Well I guess I programmed enough for today, let me go and do some maths and revise some computer science theory for tomorrow's test
lol
 
cpx
6:22 PM
Can android run the latest version of Python i.e. 3.X series?
 
Sab
A guy was picking on PHP last time
 
we like to pick on PHP because it totally deserves it.
 
Sab
And it was really confusing me since he was like @ sab all the time when he picked on PHP
I found PHP fun though xD
I managed to make a whole ecommerce platform in it
 
cpx
On Symbian, it reached 2.X
 
Sab
without any prior programming knowledge
It's just messy
 
cpx
6:23 PM
Oh but that was 5 years ago!
 
@cpx, I've got a "QPython" app on my android, but I think that's 2.x
 
Sab
My goal is to learn Django and make a website in it using my awesome html/css skills :3
And ofc the awesome python skill I'll acquire
 
cpx
@Kevin Does it try to auto-connect to network as you launch it?
 
The most detailed flaming of the language you're likely to find
 
cpx
On Symbian, it has that auto-connect problem. Like every time you startup the shell, it asks you for network.
 
6:25 PM
@cpx I don't think so
 
Sab
Love the llama favicon
 
I think it's a pokemon
Dude seems to like eevee. No judgements here.
 
cpx
Cool. I'm thinking of getting android myself too. Symbian is old.
I'd like working in Python on it as well.
 
Sab
eevee level 9000
 
I'm glad to have a Python REPL on me at all times, but I basically never use it. the little touchscreen doesn't lend itself well to writing code
 
Sab
6:28 PM
How did you guys transition from the beginner to advanced python programmer?
This is something I would love to know.
 
Via the ancient ceremony
 
Sab
lolwut?
 
By attempting increasingly difficult projects. And by reading/answering a lot of SO questions.
 
10 python programmers are put into a pit. Only one may leave. There was so much blood...
 
cpx
Practicing more python. Simple.
 
Sab
6:30 PM
:)
So it's good I'm attempting to make the l-system
 
Oh, and by seeking out people more talented than me and learning from them.
 
Sab
though I would like to make something more challenging
13 secs ago, by Kevin
Oh, and by seeking out people more talented than me and learning from them.
Doing that already :D
if you know what I mean. :3
 
I probably got 30% of my obscure Python knowledge from Martijn
 
Sab
I got loads of knowledge from you and FF
and Peter
and crow and some other guys
 
But yes. Just build upon your knowledge. Start small and grow. If you try to go for an insanely difficult project then you may struggle without the basics. A lot of people seem to ask extremely simple questions about simple python on their insanely difficult projects.
 
Sab
6:31 PM
Well, joining this room, I learned more in 2 days than I could in a month
 
I joined this room to learn. I have managed to help others during my time here but I'm still learning a lot.
 
Sab
I joined it to learn too. The thing that I like is people here actually help.
I went in PHP room once (on a friends account) to ask for help
They were trolling
Well Rhubarb guys. I'll go do something else now. Tired with the computer.
Cheers.
 
see ya
 
cpx
I need to learn to join this room to learn Python.
I'm reading from Learning Python 5th Edition
I think to learn better it would be best to read straight from the docs.
Are the obscure things in Python mostly undocumented?
 
6:44 PM
You probably won't find anything in the docs that specifically discusses the Default Mutable Argument gotcha, for instance.
 
Or XHTML i can't tell
 
It might mention that the expression in a default argument is evaluated once at definition time, and then it's up to you to determine if that could produce surprising results
It won't say "(watch out when using a list as a default argument)"
@ExoticBirdsMerchant, I'd expect an <HTML> tag if it was HTML
 
wow holy moses....what is it? :P
I really really need to parse that
 
It looks a lot like XML to me
 
Hmmmmmm but @Kevin it has <table> tabs inside
<table class="report" border="0" cellspacing="2" id="ID0EDKBG">
<tr>
 
6:47 PM
That's OK. XML can contain any kind of tag names.
 
<table> and <tr> and table row
ohhhh so it is XML okie thanx now i will find a parser
 
If you think it's HTML, the beautifulsoup library might be able to parse it.
 
I am not sure
 
They say it's pretty forgiving about "nonstandard" syntax. For instance, not having an <HTML> tag.
 
ohhh how can we know surely what it is? :P
 
6:50 PM
Look on their website for details
 
it looks very suspicious to me that it has <table> and <tr> and <td> tags for sure
 
I don't know. I don't spend much time with markup languages of any kind
 
They should say "our data is provided in xxx format"
 
@Ffisegydd well they say complete submission txt file nothing else
 
From an earlier conversation, it seems that the file is in a "SEC" format commonly used in the finance sector.
 
6:52 PM
anyhow i believe bs4 might do the job
@Kevin wow thats a bomb!!! a SEC format
 
cpx
@Kevin: What will be the books to read after Learning Python 5th?
 
@kevin the xml files are in a SEC format called XBRL = extensive business reporting language but i am going text here
 
I have no clue what I am doing
 
@ExoticBirdsMerchant Are you saying that's an information bombshell? I don't mean to mislead you - I don't know what format it's in. I'm just repeating what I remember you saying
 
@Kevin the xml is in xbrl which the financial template of xml the txt i dunno what kind of animal
 
6:56 PM
mm hmm, mm hmm... I know some of these words
 
Could it be SGML who knows i am googling i want to find so i can pick up a correct parser :-)
 
@cpx I don't know. I don't read many books.
I've found Jonathan Livingston Seagull to be pretty motivating.
 
cpx
I always read half of any book but never complete.
 
(and don't say that's not a programming book -- you have to look at the subtext! :-) )
I'm sure you can complete J.L.S. It's fifty pages long, and about 20% pictures of birds.
 
cpx
Due to this habit, I missed reading one of the important topics of Python from book. E.g. Classes, Exception Handling, Inheritance.
It is like as if I lose interest and quickly skip over what's left in the end of book.
 
7:23 PM
I feel like a hero again. I read 38 emails and answered most of them.
 
That would take me approximately 38 days :-)
 
then probably you are like me. I barely find the words to describe how much I hate all kinds of written communication
well, not all kinds -- I love this chat-room
but probably because it is not a "must"
 
Chat's nice because most of the time I can go completely silent for hours and it doesn't matter.
 
^ exactly.
 
emails demand a response; phone calls require an efficient exchange of information; in one-on-one conversations, you have to be entertaining 50% of the time
aaah, too many expectations!
 
7:31 PM
we need to find a better communication channel
actually facebook's chat/message is something I like -- even though I hate almost everything about fb in general
but it is working, it is a bit more serious than a chat, but not as heavy as an email
 
user559633
7:44 PM
@cpx what would you consider the "obscure things?"
 
cpx
I'm not so sure. I just heard from @Kevin.
1 hour ago, by Kevin
I probably got 30% of my obscure Python knowledge from Martijn
 
"obscure" for me, can mean a lot of things. In that context, I think it's just "stuff I didn't know yet". Other times it might be "things you can do in Python, that you can't do in other languages". (Those two definitions might have a lot of overlap, btw)
It could be "features of the language that aren't necessary for turing completeness", or "a feature, that, when I read about it the first time, I said 'neat.'"
 
Coroutines are pretty obscure, for instance.
 
That one qualifies under all the above definitions :-D
 
I'm yet to find a good use case for them in my work unfortunately :( possibly because while I understand what they do I don't understand it that thoroughly
 
7:56 PM
I use them in graphical programs which contain a mainloop method, which never returns once you call it, but which invokes a user-supplied idle method every 60th of a second.
When you want to do some work that takes longer than a 60th of a second (say, moving a sprite from one side of the screen to another over the course of a second), it's useful to have a coroutine that does a single frame of work, then yields, 60 times in a row
Yeah, I could write a class with a doAFrameOfWork method, but the amount of necessary code scales a lot faster with complexity, compared to coroutines. So I'm thankful to have them.
 
8:36 PM
@Kevin pretty nice life-saver: shaderific.com/glsl-functions
 
question; does anyone find it easier to work on multiple things at the same time, rather than one ticket at a time?
 
I don't -- I like focusing very deeply on one exact situation
 
always wondered, how are you guys able spend so much time answering? some answers I see are fairly cumbersome. It is absolutely awesome that people do that, but curious.. just altruistic tendencies or..?
 
@rodling I answer when I can because I feel like it helps clarify my own knowledge when explaining it to someone else
 
8:51 PM
Oh i understand, I like solving occasional puzzle in the chatroom too, especially like those one liners but it seems some people spend.. a lot of time overall
I guess for you it is a form of continuing education on the topic?
 
user559633
@rodling i work at a chemical weapons factory. answering python and ruby questions on SO is my way of coming out cosmically neutral
 
arent chem weapons mostly bannedd? lol
 
I'm a murderer on death row so I've got all the time in the world.
Lol. I answer because I feel it helps me to learn mainly. One of the best ways of being able to test your knowledge is to try to explain it to someone else.
 
user559633
@rodling mostly :)
 
I probably ask like, 4-5 questions a day though
 
user559633
8:57 PM
i focus on the disabled-orphan grade
 
user559633
i always end up solving my own questions
 
half of the time, when I start typing a question, while trying to explain it to others, I realize all the flaws in my logic
 
user559633
realtalk: i answer questions because half the time i'm on SO, i'm procrastinating
 
user559633
yeah
 
9:01 PM
what is a gravatar, exactly?
 
Kevins face.
 
9:25 PM
anyone familiar with vagrant?
 
9:35 PM
nope, new virtualenv?
 
not really, more like a virtual machine
 
fcuk yeah! separately adjustable corner fillets only with shaders!
 
10:37 PM
heya @JonClements why aren't you sleeping?
 
 
1 hour later…
user3444876
11:44 PM
Hello
 
cpx
Hi
 
user3444876
My Python students are learning quick!
 

« first day (1283 days earlier)      last day (3683 days later) »