« first day (1500 days earlier)      last day (3431 days later) » 

4:40 AM
response = {"access_key": "lTiz3fYpDMrRx9aWCCRoJvic8NJXcXH2"}
print response["access_key"] string indices must be integers error
 
4:57 AM
unicode problem, i did a json.loads(response) before trying to access the key
 
 
1 hour later…
6:18 AM
cbg
 
Cbg
 
cbg
 
6:36 AM
Oh great... what's Jürgen supposed to be for a name
 
6:47 AM
cbg
Is there a way to identify whether a word is english or french? Unicode is the approach but what in case a french word makes use of all english alphabets?
 
I don't think Unicode will help
For that exact reason :)
 
yeah..
So any other idea?
 
with python libraries no idea but there are commandline translators and dictionaries
dictionary might be better
i saw a google translator cli for linux
 
Yeah I think you just need to search and decide. as @Arden says there may be algorithms or even libraries that establish the best way to do it
 
there might be corpora for each language out there , maybe..
 
6:54 AM
looks hopeful...
 
@JonClements that is awesome!!!
 
I've been programming a year and been doing fine using geany as an ide, should i bother with vim or emacs ?
 
7:13 AM
They're a challenge - but useful if all you've got is shell access
 
7:29 AM
Getting close to finishing my Laravel project. I'm convinced I'd have finished with Django in about one fifth of the time
 
7:45 AM
Cbg
 
cbg @Ffisegydd
 
How's it going puppy?
 
@Ffisegydd was a long night :(
@Ffisegydd how you doing fractal thingy?
How many "black friday" deals is Amazon going to send me this week? And why's it being racist!?
 
8:01 AM
Not bad. Busy with PhD. Nidaba is starting to slowly start rolling though.
Should be able to get some more done today at lunch.
 
No rush, no rush... you're allowed to relax and eat your lunch...
 
I can eat and type at the same time :p
Plus I take an hour for lunch but I can eat a toast sandwich in 2 minutes
 
Cbg :)
 
@Ffisegydd a "toast sandwich" is that a slice of toast between two slices of bread? You're just weird dude... :p
cbg @Ian :)
 
I'm just poor, dude :P
And yes it is.
Lunch of champions and/or students.
 
8:08 AM
@Ffisegydd I want a ham and cheese toastie now :(
or a panini...
Since my shopping doesn't turn up until this afternoon, I guess I'm stuck with a bowl of museli...
 
You order shopping online? I'd love to do that, but awkward to get it delivered when you don't work from home.
 
They deliver until 9pm or something
 
If you do self._data = data in an __init__ method, should you use self._data or data in the rest of the same __init__ method?
Kind of a "style" question.
 
if I'm doing operations on it that require it to be stored on the instance, then use self
just makes it perfectly clear you don't mean the argument and you don't mean in the class scope
 
Yeah. Basically referring to github.com/sopython/nidaba/blob/…
Chillar has done a fair bit so far :)
 
8:18 AM
@Ffisegydd oh, I was having a quick goosey at that the other day
 
Thoughts?
 
What'd make sense is that instead of each of them inherit from object - they inherit from a custom base class...
That way, you can tell they're base objects by type checking, and also use the base class to provide abstract/required methods they should provide... eg: get, set, update or whatever
 
That is a very good point.
 
(but to start with - at the very least, they should have a custom common base)
 
Yeah, even if it's an empty custom base which just inherits from object.
 
8:21 AM
Exactly
 
Added it as an Issue, hopefully I can catch Chillar later today and he can add some. Over lunch I'm going to look at getting the setup.py working with testing.
 
@Ffisegydd sounds cool
 
Right I need to get out of my dressing gown and head to work
 
cgb
 
@Ffisegydd no - no - do an Arthur Dent
 
8:35 AM
Dudes, what's that new thing instead of pip?
s/Dudes/peeps
 
I thought pip was the new thing
 
8:53 AM
I wasn't aware there was a newer one...
 
maybe i dreamt it
i want to say it's called "webload" but i think i might've mixed it up with webpack for javascript :D
 
Javascript gets a new one every week :) until ECMAScript Modules come out
 
argh, im going crazy
is there a site with all packagemanagers?
 
@limelights allpackagemanagers.com ?
 
lol
:D
 
9:06 AM
That's a scam. It's allpackagemanagers.xxx. Oh wait, that's managers with packages.
 
Wow.... AllPackageManagers.com is for sale!
Apprently - sopython.com has had 72 unique users
 
@JonClements Buy it just so you can list every package manager ever except Rubygems
Mwahahaa
 
What is a unique visitor
Is it the combination of a cookie, an IP number and browser agent?
 
Surely a login?
Unless you can access the room anonymously
 
It's whatever google determines to be a unique visitor :)
 
9:12 AM
The robots are taking over
 
Interesting that the chatroom rules are the most popular page apart from the main page :)
I didn't think anyone actually read them :p
 
Is there a dialect of Python that supports tail recursion?
 
@Ronald what does google tell you?
 
Google starts talking about Sussman, SICP and LISP
 
@Ronald why do you think Google does that?
 
9:18 AM
Because people are also seeking a dialect of Python that supports tail recursion
 
Why would people look for that?
 
Why do you think people would look for that?
 
Do you like cheese?
 
I love cheese
 
Good - finished paperwork, project deployed... couple of hours kip before doing it all again... rbrb for now
 
9:28 AM
lol
 
9:40 AM
cbg again
In the office, sans dressing gown, sans-sans normal clothing.
 
10:12 AM
Guys, I need to choose between computer science and information technology for my degree
I don't know which one to choose. Aren't they just the same?
 
No.
 
The uni just says CS is the study of the nature and applications of computation and that IT is the study of the effective usage of computers
 
cbg
 
10:33 AM
@MartijnPieters - care to venture an answer stackoverflow.com/questions/27102639/… ?
 
cbg all !
 
Is this possible in python using subprocess module ?
 
10:52 AM
yes for starting. for stopping use os.kill(pid)
though...
how was the process numbers for screen
 
Could you answer the question if you find time ? I really would love to know how that can be done :)
 
@limelights looks like Jon already covered you there.
 
@rvraghav93 you really cannot get the pid of the screen process directly
 
Ah ! so I guess no way to do the same ... ? ( Just to make sure I understood the qn correctly, it asks about running a subrocess inside a subprocess ( screen ) right ? ) and noting down all the PID's ...
 
   -S sessionname
        When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for "screen -list"  and  "screen  -r"
        actions. It substitutes the default [tty.host] suffix.
this is even better, you can name your screens using -S
-d -m to start it detached on background
screen will fork so the child pid is not the pid of the screen, and also not the program running in it
 
11:04 AM
thanks for the info ... :)
 
@RonaldMunodawafa this is my take; correct me if I'm wrong someone: Computer Science if you want to make computers do things (e.g. write programs) - IT if you want to run computers, i.e. maintain databases, install and configure operating systems
@RonaldMunodawafa I'd say it's easier to study CS and move into IT than study IT and move the other way (ie into software), but it can be done
 
@RobertGrant my target is specialising in process complexity, aritificial intelligence and machine learning
So I will go with CS then
 
Yeah definitely
 
Thanks Robert
Can I show you the curricula because the IT you are referring to is different
The IT course excluding prerequisites such as Commerce:
Year 1: Computer Organisation and Platform technologies; System and network administration; HTML and CSS; Internet security
Year 2: Introduction to programming in PHP and JavaScript; system integration; Social and professional issues; at least one elective from the commerce electives
Year 3: SQL; Introduction to Ruby programming with Rails; Introdcution to Django programming with Django; Senior project; at least one elective from the commerce electives
The CS course excluding prerequisites like Discrete Math:
Year 1: Problem solving and algorithm development; Programming in Scheme and in C; Sorting and searching; Number Systems; Object oriented programming in C++; Linear Data Structures; Functional programming in Haskell
Year 2: Logic; Data structures; Algorithms; Databases; Concurrency; Computer architecture; Artificial intelligence;
Year 3: Operating Systems; Networks; Software engineering; Compilers; Machine Learning; 3D Graphics;
Year 4: Research Project; Any two electives of interest
It seems the IT course they are offering is a rip off
 
You definitely want CS
 
11:16 AM
thanks
 
But system and network administration is what I meant with IT. They also have some web development, but you don't need to study at university to learn that
Learn the theory and fundamentals of CS and everything else is possible from there
 
Which is why I think it is a rip off
 
Not that it's a bad subject, but you'll get much more benefit studying ML etc at university than web design. Much easier to pick up web design later than ML later
 
Among the senior electives there is lambda calculus which is not in the Math faculty. I am confused
Is CS like some application of Mathematics in some way or it is actually a branch of mathematics
 
Good question. A bit of both. Logic and set theory are more like standard maths, but you'll get into very CS-specific maths like lambda calculus as well. It's worth getting exposure to it at university, even if you don't use it again (some maths is quite specific to certain areas of programming, e.g. compiler development), you'll know how it works
 
11:36 AM
The more we talk about it appears CS is more conceptual in nature
 
It's a very broad spectrum from very theoretical to very practical. Each university has a different range (e.g. where I went, Nottingham, is split quite evenly, whereas at Cambridge it's much more theoretical). I'd say go as theoretical as you can manage, because that will set you up well later on, but also pick one or two practical ones so you know how to actually get stuff done.
 
@Ronald is there any particular reason you're asking/making the same statements here, the lounge and javascript? The irrelevancy and randomness of your questions is getting disruptive and annoying enough - the fact you're doing it in two other rooms as well makes it near enough spamming. I can't speak for the other rooms, but can you at least desist doing so here please?
 
@JonElements ok
 
Wow I didn't realise he was saying the same in the Lounge and JS.
 
11:52 AM
You get different perspectives from different people like I got a very good view from @RobertGrant.
 
@JonClements sorry
shuts up :)
 
It's not your fault at all Robert
 
I apologise for the unintentional spam. It is my fault
 
You obviously didn't know he'd asked the same to the other people, and we are here, after all, to discuss things.
Been looking at BDD, looks really interesting actually pythonhosted.org/behave/tutorial.html
 
now, that is interesting since we threw out our bdd a little while ago.
 
12:00 PM
Really? Not a fan?
I don't really do any kind of "driven development", I just code (which works fine when I work on my own :P)
 
@Ffisegydd also check out lettuce - that's nice and simple... had pleasant enough experiences with it in the past
 
when I run a python program to find the difference between two date '2014.11.24 06:15' - '2014.11.24 06:00' it says unsupported operand types for -: 'str' and 'str'. But when I print the same in ipython it says Timestamp('2014-11-24 06:00', tz=None)
so what is it ? 'str' or Timestamp
 
@user994572 can you provide some example code?
Because in one cases you're using strings, and in the other you're using pandas or numpy
 
sure
(df['date'][i] - df['date'][i+1]).total_seconds()
df is a dataframe
 
Well in one case df['data'][i] is a string, and in the other it's a Timestamp object.
In your python program, are you sure you've converted from a string to a Timestamp properly in pandas?
 
12:10 PM
I don't think so...how can I convert this string to a datetime object ?
i tried df['date'][i].to_datetime()
doesn't work.
 
How does it not work?
Unfortunately, I cannot read minds yet, and so unless you actually provide details then I can't help you.
 
@Ffisegydd Yeah, we found that BDD, whilst conceptually awesome, wasn't for our organisation since we evolved too quickly maintaining those BDD tests were more cumbersome than effective.
 
@limelights yeah I can see how that would be an issue, I think it might work better for open source projects and such where you have a team that's spread out and possibly working at different times. Not gonna bring it in for Nidaba though :P
 
12:29 PM
@Ffisegydd found the answer here...stackoverflow.com/questions/19068269/…
so looks like the string object doesn't have the method to_datetime()
 
@user994572 use the datetime lib...
>>> from datetime import datetime
>>> s = '2014.11.24 06:15'
>>> datetime.strptime(s, '%Y.%m.%d %H:%M')
datetime.datetime(2014, 11, 24, 6, 15)
heya @Kurubaran
 
yes.
 
I am writing a card game for and it needs shuffling. I looked up random sorting. Is bogosort the algorithm people use for random sorting and how random is it?
 
It's...random...
 
12:40 PM
I will look for the module that contains thw method. Thanks
 
Urgh I've gotten python setup.py test working, but it runs all the tests for all the subpackages as well. Fun fact: numpy as a lot of really, really intensive tests.
 
what is wrong with this inclusion, just want to reduce the length of the call ?
from datetime import datetime
import datetime.strptime as dstrptime
says No module named strptime
 
Because it's not a module - it's a method
 
oh.
 
datetime is a module, then within that module (confusingly) is a class called datetime, which has a method called strptime
 
12:45 PM
Is there anyway to shorten this datetime.datetime.strptime ?
 
You could do from datetime import datetime; dstrptime = datetime.strptime but you're not gaining anything
 
I tend to do import datetime as dt so I can have dt.datetime.strptime
 
Of course, if you wanted to get really extreme and have everyone hate you, you could also do: dstrptime = __import__('datetime').datetime.strptime
 
nice...Learnt something new today. Thanks guys!
 
@user994572 seriously - please don't do what I've suggested... it'll work, but it's more of a joke than a serious option :)
 
12:49 PM
:) sure.
 
Just when I thought type annotations were coming since Guido van Rossum wanted them
 
checks the Javascript room
@RonaldMunodawafa yeah lots of debate around those from what I saw; nowhere near enough conclusions to warrant adding it
Or not yet
Particularly since they were suggesting formalising the syntax without formalising what it meant
 
And @RobertGrant I owe you an apology. According to Guido, type annotations improve app correctness but he doesn't want the semantic value changed
 
Well you were right, he was suggesting adding them, but the debate produced extremely opposing, equally well argued viewpoints, so I think he probably thought it's not worth holding up the 3.5 release for
 
It seems Bob Ippolito's influence on Guido van Russom will likely result in Haskell being substantially influential to Python 4
 
1:06 PM
@Ronald very unlikely since reduce was moved to functools in 3.x and Guido isn't a fan of still having map/filter as builtins...
 
The I can't post code here because then I'll be flagged for self-plagiarism excuse is.. creative?
I think Kevin is right in suspecting that they are doing homework and don't want to be caught by their teacher..
 
self-plagiarism? That's an interesting one
 
What is self-plagiarism?
 
if only they were as creative with their hw :D
 
1:07 PM
Self-plagiarism is a genuine thing (at least in academia/research)
 
I know plagiarism is illegal but self-plagiarism? How do you copy yourself?
 
Easily...you copy yourself...
:P
 
lol. Apparently there is a wikipedia entry !
 
Anyway, homework and stack overflow
 
1:09 PM
It's not a made up thing, honestly.
 
It is an oxymoron
 
So, if I was to say that I was a horrible evil person that does xyz, can I sue myself under self-libel?
 
@Ronald it's not at all.
 
So self-plagiarism is the reuse of one's own work
 
An oxymoron is something like "living dead", the opposite of self is not plagiarism.
 
1:11 PM
The opposite of living is not dead. It is dying
 
Self-plagiarism is when you re-use your own work but pretend it is new.
 
So then it is a misnomer
 
How is it? It's entirely accurate.
 
How this applies to showing your code in a Stack Overflow question is a mystery to me.
 
It is when you plagiarise yourself.
 
1:13 PM
@RonaldMunodawafa I don't follow. If you re-use your own work without disclosing you did so, in settings where this matters, then you are plagiarising your own work.
 
Nidaba now supports tox \o/
 
I am confused
 
Say you claim to have found a novel new way to treat an illness, but all you really did is just re-present earlier findings with new words, you are self-plagiarising.
There is nothing new there, but you claim there is, to try and get attention and funding, or whatever.
 
@Roland I write an essay for university, I get a grade for it. I then use the same essay for another assignment with a different lecturer. I have plagiarised myself. It is exactly the same as if I'd copied someone elses essay.
 
That's a misrepresentation of the situation, by re-using your own work in a new setting.
 
1:15 PM
I interpreted that post as "my professor is using an automated tool that searches the web for code snippets that match whatever we submit as assignments. Anything he finds is marked as plagiarism, even if I tell him that I originally wrote the code it matches"
 
So @Ffisegydd is it illegal to do so because I have submitted a debate essay for my English class and was the highest
 
I can imagine this kind of thing happening in a "zero tolerance" setting.
 
It's got nothing to do with the mark.
 
So the question is: is it illegal
 
I don't know what the law is in Zimbabwe.
 
1:16 PM
It's only plagiarism in the sense that the dumb plagiarism detection tool pings and goes "plagiarism found"
 
I don't know as well since I haven't studied home
So as programmers we self-plagiarise a lot
 
There are nuances as to what is self-plagiarism and what is fair use, after all most of the time you own your own work. Or you're working for someone who owns your work who won't care if you use your work again for them.
 
@Ffisegydd why do need the last line in nidaba readme which points to itself?
Ah... for when the readme is read out of github, that makes sense... sorry for the noise :P
 
1:32 PM
@Ffisegydd should we tests to project root?
 
After my card project, I will go for writing an implementation of AAC in Python
 
@ChillarAnand What do you mean?
 
right now we have test in features. we also need to write some tests for core also?
 
@ChillarAnand yes, there are two ways to write the tests (having them with the package and at the project root)
I chose to have them inside the package so that they're installed with the package itself.
 
so, for core we need to create one more test dir and write tests there?
 
1:42 PM
Yep
So the core tests will just test the core objects themselves, then in the features.test dir we can have tests that use Question objects etc
But you shouldn't be testing features stuff in core.tests etc
 
got it.
:D
 
Hmmm how wise is it to use pygame vs OpenGL and wrapping it up
 
I would like to share a negative experience I had with pygame. I wrote a Tetris clone, and sometimes the sound effects play at half volume. I could never determine why.
 
That's not too bad, a £125 shop for £87 including delivery
greetings and salutations @Kevin
 
Could I also contribute to nidaba ? Any pointers for newbies ?
@Kevin I tried your tetris ... got this IOError: [Errno 2] No such file or directory: 'pieces/T.txt' ?
 
1:53 PM
@rvraghav93 you are free to submit a PR as it is an open source project.
 
@Martijn where's your hammer ?
 
@Kevin which version of pygame was it?
 
Not sure. brb, computer problems
 
@JonClements hammer swung.
 
Has anyone used Blender GE?
 
2:05 PM
@rvraghav93 Strange. I can see pieces/t.txt right there in the git directory.
@RonaldMunodawafa Probably the same version I'm using now, 1.9.2pre
 
@Kevin care to be experiment? If we ported your project to Unity or Blender or Maya will it be okay
 
@rvraghav93 What OS are you using? Maybe it's something weird that uses case-sensitive filenames.
 
@Ffisegydd are we going to create Question objects from SE api or dumps?
 
@Kevin Im using xfce/ubuntu!
 
morning everyone
 
2:09 PM
Morning!
 
@RonaldMunodawafa If you're asking if you can fork my project so you can write your own version, yes, that's fine
 
@Chillar we have a database on the server which has the data dumps. It'll also be continually updated using the SE API, but that will be a different project entirely. So we'll be creating them from our database which is in effect the SE API.
 
first item in todo.txt is "decide licensing for code". Should have done that a long time ago.
 
Also we may occasionally make them from stuff that's come via websockets.
 
Hmm, is there like, a specific method of conveying what license your code uses? Do I have to make a LICENSING.txt file with exactly the right text or else it "doesn't count"? Or can I just stick "This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License" any old place in the README?
 
2:13 PM
You should have a LICENCE.md
In fact if you're on Github and you create a file through the web and call it LICENCE.md, it'll automatically suggest different licences for you and then fill it in.
 
Capital, now I only need to find the "create a file" button.
There it is!
 
See the little + next to "Falling-Block-Game"
 
Thanks :-) The deed is done.
I would have chosen the "do whatever the F you want" license, as it accurately represents my attitude toward derivative works. But I don't want profanity in my code base. so GNU will have to do.
 
@kevin GNU is not that :)
 
2:20 PM
MIT is a better fit imo
 
Fine, updated to MIT :-)
 
The Kevin License: "This work is free to all people named Kevin."
 
@Kevin will you make a game called Kevin's Crypt in KevinScript?
 
Ooh, you tempt me.
I'd just need to make a raw_input method, and I could hack together a terrible text adventure in KS.
Or did I already make such a method? I forget.
My first issue. It is a bittersweet feeling ;_;
Hooray, someone other than me ran my code! Boo, it didn't work properly.
4
 
@Ffisegydd are you doing any actual work at work, or just sorting out sopython's github? :p
 
2:26 PM
I am about to begin thinking about doing some work in the near future.
I'm waiting for supervisor to come in so kinda twiddling thumbs and/or looking at cute pictures of cats on the internet.
 
Cabbage!
 
cbg
 
@Ffisegydd That includes a lot of people then.
 
I'm also reading up on rebasing commits so it isn't so messy on Github.
 
@rvraghav93 if the bug was caused by casing inconsistencies, I've fixed it. Maybe.
More likely I think it's some kind of "current working directory" problem, where the "pieces" directory isn't where the program expects it to be.
 
2:31 PM
github.com/sopython/nidaba/graphs/punch-card It's amusing that nidaba is most active on Fridays at lunchtime. This is because I have lunch by myself as my SO is teaching labs, so I get time to code :P
 
@Ffisegydd I've seen this one before. The caption was "error: out of toner"
 
@Kevin I had fun when I was a trainee... had to write a program that reformatted some data, and embedded JCL around it... so I changed the error messages on the printer for when it was out of paper to say: "I'M HUNGRY - FEED ME!" and when it had a paper jam say: "TRAY IS BIGGER THAN STOMACH"
Everyone found it amusing except the managing director
still amazed I lasted 6 years at that company to be honest
 
Nice :-)
 
man npm is acting bizarre
 
Is it bringing up the npm manual?
rolls eyes at own joke
 
2:46 PM
@Robert Had to read it four times to understand this…
 
It'd be nice if you got a gold in python, dupe hammers counted for version specific tags :(
wonder what's happening with the silver badge proposals
 
rbrb
 
except I don't even have a silver in 3.x sighs
@robert rbrb
 
I was just looking at an old game project of mine to see if I could integrate remote multiplayer play. I thought "I'd have to modify the Player base class so it can operate asynchronously", but apparently it already does. A nice gift from myself in the past.
 
@JonClements You mean general python gives you the ability for both py-3 and py-2?
 
2:53 PM
For once, Past Kevin isn't foiling me by staying up late or eating the last cookie.
 
@Kevin “You’re welcome Kevin. Love, Kevin.”
 
A mate once told me, he'd left himself a pint of water and a post-it note for his hangover: "drink this, because you'll feel rough in the morning" - turns out he left himself vodka for a laugh
 
n1.
 
masochistic or what
 
I feel great pity for people that become self-trollers when they're drunk.
"Haha, I'll hide my keys in the freezer, what a scream this will be"
"let's go online and order expensive/useless/embarrassing things"
 
2:58 PM
@Kevin I once lost my car keys in the freezer :(
Was putting away shopping and somehow put the car key in the freezer...
 
That's why I always check the fridge if I can't find them anywhere else.
 
had to use the spare key, but that didn't have the fobby thingy, so couldn't arm the alarm or double lock the doors properly etc...
 
It's a surprisingly common situation, it seems. (although I haven't done it myself... Yet.)
 

« first day (1500 days earlier)      last day (3431 days later) »