« first day (1498 days earlier)      last day (3449 days later) » 
00:00 - 21:0021:00 - 23:00

12:30 AM
Huh... I'm surprised math.log doesn't use decimal calculations.
 
1:30 AM
For webapps, do API methods go in views?
or a different file? (by convention)
 
 
5 hours later…
6:32 AM
@Ffisegydd @JonClements fun times with transcripts: long messages have the "see full text", and the full text, injected via javascript, the only way you can tell there's more is that the message has class="partial", then you have to build the url and fetch the message manually
I thought I was finished with transcripts, but with that discovery, I'll have to wait until morning after I get some sleep.
 
 
3 hours later…
9:27 AM
@davidism oof. We spoke about asking for a chat api a while back, I can't remember if we did or not. If we didn't, we should do.
 
 
1 hour later…
10:38 AM
@Ffisegydd I asked for one on meta/asked balpha for details - there isn't one as such... just web sockets and post requests - which isn't publically documented
 
10:52 AM
cbg
 
cbg... new name? :)
 
Yup! got into an arguement on a different exchange so I figuerd it'd be better not to use my real name :D
 
@Jon yeah okay. Shame.
 
Can anybody better narrate what is going on in the SNMP code here?
http://pysnmp.sourceforge.net/examples/current/v1arch/agent/cmdrsp.html
I just don't get what all the def__$@__ deals are
 
@funky dunder comparision methods
 
10:58 AM
interesting...I'm new to SNMP and I am having such a hard time figuring out how to code it. The concepts seem simple enough, but the code is just so confusing
 
11:56 AM
A user asked 4 questions about one piece of code
Cbg all
 
@vaultah it happens - cbg :)
@ChillarAnand return week_day in (5, 6) is fine :)
 
12:42 PM
Ta @Chillar
 
cbg
:D
 
1:23 PM
 
1:34 PM
Any body here want to take a look at my bootstrap HTML code? I don't know where it's going worng
The html room is inactive
I'm working with flask
 
2:22 PM
Hello.. is there any working way to convert wpf iron python project into standalone exe?
 
2:44 PM
Did I miss something about my answer? It got downvoted..
 
2:56 PM
@vaultah no idea... it seems that apart from the correct answers given, you could elaborate on using len, such as ' ' * (70 - len(s)) + s
 
Hi!
Where do you find Numpy for Python 27 x64 ? I even don't find the binaries on the official Numpy site :(
I have found : lfd.uci.edu/~gohlke/pythonlibs but here is only Numpy-MKL but I am not sure about this MKL version ...
 
Get it from there
 
@Basj if you're not going to install a compiler and do it yourself, then use the version from the site you mentioned
 
@JonClements You mean Gohlke ? It seems to be a special "MKL" version ...
I don't know what it is, and I'm not sure it will run on every machine...
A biiiiiiiigggggggg package like Numpy could at least propose binaries for 64, don't you think so ? Here they propose binaries installer but only for x32 : sourceforge.net/projects/numpy/files/NumPy/1.9.1
Strange, isn't it ?
 
I can;'t explain at the moment as I'm busy
 
3:12 PM
@JonClements well, I read "And I couldn't use the built-in function len" as " I'm not supposed to use it". I'll edit the answer, thank you.
 
Hrmph. How do you read metadata of a music file?
 
@corvid I've used mutagen for mp3's before... not sure how much further it extends though
 
Does that work for AAC files? I just want to read my iTunes library
 
Chat messages, when retrieved from the "load full text" url, are in markdown, unlike the messages in the transcript.
ARGH
 
Guys. I'm making burritoes with Ghost Peppers. This is going to be INTENSE.
 
3:29 PM
@davidism ...wot.
 
you can go to http://chat.stackoverflow.com/messages/<room_id>/<message_id> for any message, not just the partial messages, and you get back the markdown instead of the rendered output in the transcript
it's like they were thinking of making an api, but stopped short of it making any sense
I'm not going to bother writing a markdown rendered for long messages, I'll just alway render them as <pre>
too much work to make it match the actual chat renderer
 
3:44 PM
@davidism going forward it'll be easier to have rabbit log transcripts
that way, we also get to keep deleted posts, flagged/starred posts
 
A while back (don't remember when exactly) I suggested that RABBIT keep a permanent transcript record of messages.
But, as Jon suggests, would be easier to query our own record then trying to get it from the official transcript (probably)
 
it was a plan before you even were active @Ffisegydd :)
I was over-ruled that Inbar didn't want it or something
 
anyone here using windows 10 demo? Seem to be getting an error
that is not code, you liar
 
it was when I typed it
 
4:22 PM
Guys, I can't believe this! I'm on hacker news.
 
wot
 
post it
 
there ya go
@Ffisegydd I credited you btw :)
 
Oh, right, I thought you'd made the top news :P
 
4:24 PM
naah
but I might, you never know :D
 
I have the faith.
 
An upvote for me, is an upvote for democacy (stealing kevin's line)
 
Well apparently I passed out on my keyboard
 
proud of you
 
haha, been a while since thats happened last
 
4:27 PM
A true coder.
 
should put the count of how many times its happened on my resume
 
eating ghost peppers was a mistake
 
4:47 PM
Transcript parser works! Now to make the frontend.
 
Nice dude
 
Hi ! Could anyone care to give me an opinion about whether my answer is more / less efficient compared to the accepted one ?
 
@rvraghav93 why not use timeit and see for yourself?
also, do you mean memory or time when you say "efficient"?
 
@davidism sure !
time efficiency ... since we do only one sort ...
 
I don't think you need to calcuate min value, you can just make the first element of the tuple -x[1]
 
Hmm mine takes 0.6 us for finding min then 1.3 us for sorting once. The double sort takes 3.6 us ... but again I didnt test with random inputs as I suppose I should ?
@davidism that is brilliant :D I totally didn't think about that !
 
5:57 PM
There's no constraint on the size of the highscore list in the question, maybe try with 100 and 100000 scores
also, you should put all this timing in your answer
 
Hello mates
 
@davidism edited the ans and credited you for the -x[1] !
@Ronald Hi !
 
cabbage
 
Why do some mathematicians find it difficult to wrap their heads around:
x = x + 1
When that is basic iteration - basic recursion taught in senior high school in Pure Math as part of Numerical Solution of Equeations
 
most people seem to have trouble with iteration more than anything when they first start, I am a teacher's aid for the beginner programming class
 
6:03 PM
I wonder why though
 
they think very concretely, instead of considering it arbitrary. Ie, they think "this happens at 1" instead of "this happens at n"
 
the notation has completely different meaning in math vs programming
 
When I was taught it in A Level Math it was pretty straight forward - it was notational magic
 
one means "this describes an equality", the other means "this describes an assignment"
 
of course in Math you put subscripts but someone who can learn Math can learn programming easily
So I suppose the problem some people have in learning iteration is the problem they have in learning recursion
I want people I teach to get it there and then
Perhaps I should introduce them to recursion first
 
6:10 PM
are you teaching programming to math people or something? why not just say "this doesn't mean an equality like in math" and move on?
also, x = x + 1 is not recursion...
 
Yes I am
 
just use pythontutor.com to show them a visualization
 
Iteration is a special form of recursion.
A recursion is simply a definition in terms of itself
 
I thought recursion meant that a method calls itself in terms of computer science
 
And there is no difference between a function and an operator. They are procedures
Not necessarily
 
6:12 PM
@RonaldMunodawafa those are some big generalizations there
 
Yes I know
Mathematically there is a difference but in programming not so much
Just syntactic sugar
 
@Ronald I guess you read too much of Godel Escher Bach :D
 
in programming, there is a huge difference between iteration and recursion
iteration occurs in one stack frame, pushing data to the heap, while recursion keeps pushing frames onto the stack
 
Of course that is the difference
 
different languages perform very differently on that
 
6:16 PM
But here I am working with people who need to learn both Python and Scheme
 
what I'm saying is that's not "syntactic sugar", that's a deliberate design choice in the language
 
Point accepted that it is not syntactic sugar but it is supposed to be conceptually
 
maybe in some pure function language it is, but neither python or scheme fit that definition
 
I hope Python becomes a pure functional language though
 
Isn't scheme supposed to be a pure fp ?
 
6:19 PM
It is
not
Otherwise it wouldn't be Turing complete
 
@Ronald It ( Python ) wont ! ever ... see this
 
what are you talking about? pure functional languages are turing complete
 
Thats wat I was wondering ... Hs is turing complete and its pure fp !
 
@Ronald are you kidding? I really hope Python doesn't become a pure functional language - it'd destroy what it's good at
 
Go to the bottom of page 5
 
6:24 PM
Pure functional languages are a great idea if you're writing a PhD thesis, but you'd be laughed out of a job trying to only use that in the real world.
 
every language has its purposes - what it can and can't easily do
 
I use C/C#/Haskell/Erlang where Python doesn't suffice
 
I use Python were Python doesn't suffice
If Python is too slow for something I might use another language but I will make sure that everything else is done in Python
 
@JonClements tried F#?
 
6:26 PM
@Johan not yet... been contemplating it though... just not enough time
 
I hear almost exclusively good things about F#
Played a little with it
 
I have F# all over the place written by other people
I just use IronPython
 
I only teach java :\ java is easier to teach than functional though
 
If I am going to teach something imperative, I want the language to be small
And close to perfect
Like Python
Python's type system is perfect
 
No one says any good things about Java & Php ever.
 
6:30 PM
Python is great, imo, because it has at least a little bit of multiple popular paradigms
 
PHP is excellent for HTML programmers
lol
Python is great because you can call a class as a method
Which is going in the right direction. There should be no difference between an object and a method
 
err... no you can call a class instance as a method...
same as C++'s always done and other languages have
 
metaclasses
but really, it's not meaningful to say you can call methods or classes, because you can really just call any object that's callable
 
let's not get into another __new__ vs __init__ :)
 
classes just happen to be callable objects, as do methods, and objects with __call__
 
6:37 PM
Which is good
 
why?
 
Because it is more expressive
 
wait wait, first you were arguing that functional is better, and functional is less expressive, now you're saying that fewer constraints are better?
pick one and stick with it, you're getting confusing
 
It depends on the context
 
6:40 PM
I'm seeing less and less context in this conversation.
 
If I am teaching, let it be functional programming. They can figure the rest for themselves
 
are you teaching compsci or programming?
 
Programming
 
functional programming is harder to learn. Object oriented is very intuitive though
 
haha... going from functional to OOP, modular/structured or any other paradigm isn't that easy :)
 
6:41 PM
So is functional programming to math students
 
I fear for your students
 
I spent more time talking about perceptions in the first lesson
 
yeah, the more you say, the less I'd want to be in your class
 
They are math students. Nothing is too difficult for Maths tduents
 
That's a high opinion of them
 
6:43 PM
might want to get a bit more focus and less ideological
 
I think programmers are very smart people
 
not necessarily, I mean, look at me
 
They work at various degrees of abstraction at the same time
They deal with complexities that only engineers and artists appreciate
 
lol.
 
I've met so many "programmers" that can't think for themselves that. I strongly disagree with you.
work on your evangelizing, it comes off a bit too fanatical right now
 
6:46 PM
I think labelling any one set of people as "intelligent" is ridiculous.
 
Well, it is known Python programmers do what they do because they are good at it and enjoy themselves
 
Is it?
 
intelligence is fairly inconsequential anyway, it's not readily measurable or quantifiable, it's mostly perception-based
 
(?:(?P<month>\w{3}) (?P<day>\d{1,2}) (?:'(?P<year>\d{2}) )?)?(?P<hour>\d{1,2}):(?P<minute>\d{2}) (?P<period>AM|PM)
how to recognize any timestamp in the transcript and starred list
timestamps can be: time, month day time, or month day year time
 
that is pretty impressive
 
6:50 PM
@corvid your job is becoming easier by the hour
 
I noticed, that's why I am pretty happy about it, I feel like by the time yours is done mine will be like 10 lines
 
You see
You are happy
And you are a Python programmer
 
Yes. Your 1 data point proves your hypothesis. Well done.
 
actually, I'm pretty sad, the only reason I had to do all this work is because there's no chat api
 
6:53 PM
davidism you want to make yourself sad
You are happy
 
I am about to each a delicious burrito though, so it's not all bad.
 
I program in Python and I'm incredibly stressed and unhappy.
 
you're making all this in a model, eh? I think if you have a @classmethod to get the chat message by id, my PR is going to be very very simple
 
@corvid there's a method to load a message from a beautifulsoup element, but you'll still need to do some work to traverse the starred list
I'm only writing the parser for the transcript pages
 
@Ffisegydd manly hug mate
 
6:55 PM
If everyone is sad, then it is rather sad that they are sad
 
Hah, don't worry about it, it was more to disprove whatever idiocy he was speaking.
 
ah, I see. Iterating the star list is fairly simple with lxml, with your method added 90% of the work will be done
I'm also mostly just curious to see it, learn a lot from looking at other's PRs
 
@Ffisegydd have you seen the new PyCharm v4 yet?
 
@davidism no? :o
 
support for ipython notebooks and debugging numpy arrays
among other improvements
 
6:58 PM
Guys would you recommend Fundamentals of Python by Ken Lambert?
 
right, puppy's gonna get a quick nap before he has to be working again
 
I want the guys to go through a book they can finish in a week at most
 
the only book on python I can recommend is diveintopython.net
 
it's okay, Python in a Nutshell is a good read to get a basic idea of most of python
 
rbrb for now
 
6:59 PM
but is assumes a working knowledge of programming already
rbrb
 
These guys are new to programming
I want them to get a complete book
 
How about Think Like a Computer Scientist
 
I don't know, I don't read programming books, I've always picked it up by reading official documentation
 
Are the docs a good idea
 
7:02 PM
no, that's probably a terrible idea for new programmers
 
anyway - before I put my head on the pillow - @Ronald if you're asking for suggestions on material to how to teach your students, that's pretty much your job, knowing your students and such - we'll have bias between what will and work won't for our selves... your job - you work it out
 
+1
 
you should tell them where the docs are, but not just point them at that to learn
 
documentation generally has the mission statement of "you know programming, but you don't know this language, so here's what's in this language"
 
I'm just weird that way, most students would be totally lost.
 
7:03 PM
You are asking strangers on the internet how to teach your class. If I was one of your students and found out you didn't know what to teach, I'd go effing mental.
 
also, you're asking the people who frequent a python chatroom on the weekends, we are most likely not a good view of normal students
 
I just want to improve their reading material because their previous teacher had them in Codeacemdy
 
What's wrong with Codeacademy?
 
@Ronald then do your research and stand by it... don't ask strangers
 
I want something rigorous for them
 
7:05 PM
honestly, I hated having to buy and read textbooks for university, I loved lectures that actually taught the material
 
You are looking for a book that will do all your work for you and will work for every student, it does not exist.
 
imo it tends to be best to learn by... just... doing it. You don't learn guitar by fastidiously studying scales, modes, etc. You learn by picking up a guitar and seeing what works
 
I bought two books at university and used neither of them.
 
I like the analogy
 
Perhaps you could ask other programming teachers in your school/community what they use?
 
7:07 PM
They teach other languages
 
right, but a book about a specific language isn't very useful in a school setting compared to a general compsci book, is our point
 
And even if you did want to give them a specifically python book, you could find out, from your peers, what type of book they recommend.
 
it's essentially an outdated snapshot of the language docs
 
You're right
I found this to be good www-inst.eecs.berkeley.edu/~cs61a/sp12 I guess I will teach them that
So we can move onto more important topics
 
I found that the lecturers who had to rely on books were the worst lecturers.
 
7:10 PM
I am not a lecturer
 
Same for teachers.
 
You a TA? I work as a TA currently
 
Not even
 
I worked as a TA for three years.
 
I am a course teacher for Math students want to be introduced to programming
It is more of community service
 
7:11 PM
someone is an upstanding citizen
 
Thank you
I hardly get enough interaction with them so whatever I teach them when I meet them I want it to be something worth the meeting
 
Then don't teach from a bloody book, they can read a book themselves.
 
I want the book so they can read it for themselves and come into class knowing how to program so we can start discussing data structures and algorithms
By the end of June I should leave the city with them having read K & R, the GCC Manual and SICP from start to end on their own
 
better to give them an assignment and let them figure it out, that's what a lot of programming is like
 
I meeting them in two weeks so I suppose I will discuss something they might enjoy with them
I want to get their view and know what is in their minds. I want them to solve problems like wishful thinkers
I want them to believe
 
7:17 PM
You won't do that with one class.
 
I feel like this has turned into a bad interpretation of
Self-actualization is a term that has been used in various psychology theories, often in slightly different ways. The term was originally introduced by the organismic theorist Kurt Goldstein for the motive to realize one's full potential. Expressing one's creativity, quest for spiritual enlightenment, pursuit of knowledge, and the desire to give to society are examples of self-actualization. In Goldstein's view, it is the organism's master motive, the only real motive: "the tendency to actualize itself as fully as possible is the basic drive... the drive of self-actualization." Carl Rogers similarly...
 
Which is the problem I am trying to solve
 
You won't solve it. You will not give someone the confidence that you seem to think they need with one class.
 
There is this lady who has issues with syntax
And she feels as though she does not belong in the class
 
Rather than K&R, GCC, and SICP, which are incredibly dull, if informative, you need to reduce your scope a ton, have some cool simple examples that demonstrate the power of programming, get them excited about the possibilities, but don't try to cram ideology and huge texts in.
 
7:19 PM
So I decided the easiest thing to do was to teach her Scheme since she found it easier (surprisingly) and now she doesn't want to move to Python
 
Maybe she doesn't. This isn't a harsh thing to say. In fact, it's a very fair and difficult thing to say. But maybe she doesn't belong. You have to take this into account.
 
If this really is an intro class, you are thinking way too big.
 
+1 for davidism
 
Yes, contrary to current popular opinion, not everyone should be a programmer.
 
The opportunity to learn programming should equal the opportunity to learn music
 
7:21 PM
now that I think about it, if these are really math people, you should introduce them to Wolfram Mathematica and let them go crazy
 
davidism you are smart
 
I know that :)
 
So I will narrow my scope to C and Scheme starting with Scheme since that lady I made reference to found it easier to work with. Their projects will however be in Python
By June they should be ready to take on data structure and algorithm classes
 
I think there is a failure to communicate here.
 
Why teach them one thing and ask them to hand in a project in another?
 
7:25 PM
We seem to be talking completely past you
 
So that they learn more on their own
 
...
That is ridiculous.
 
I want them to discover the beauty of Python
On their own
 
good luck with that. </conversation>
 
Because I have decided that the Python docs are good enough and up to date
 
7:26 PM
And on that bomb shell, I'm leaving.
 
np.array(zip((np.random.randint(130), range(130))))    # Creating tuples of [ (x, 0), (x2, 1) .... (x130, 129) ]
Is there a better way to do the above ??
using np / otherwise ?
I meant this :
np.dstack((np.random.randint(100, size=130), np.arange(130)))
 
7:48 PM
@davidism pycharm v4 looks amazing.
 
8:03 PM
@Ffisegydd around ? does this ques. look like its based on up / downsampling ?
 
8:47 PM
Playing with Pycharm v4. I like.
 
00:00 - 21:0021:00 - 23:00

« first day (1498 days earlier)      last day (3449 days later) »