/srv/irclogs.ubuntu.com/2016/10/03/#ubuntu-za.txt

pavlushkaahoy za!05:40
pavlushkaHey Cryterion , so early? :)05:40
CryterionMorning, yeah, at work already, grrr05:41
NaeilMorning pavlushka 05:41
CryterionMaaz: is coffee on05:42
MaazCryterion: Sorry...05:42
CryterionMaaz: Coffee please05:43
MaazCryterion: There isn't a pot on05:43
pavlushkaMorning Naeil :)05:54
pavlushkalol @ Cryterion's situ :p05:54
pavlushkaMaaz coffee on05:54
* Maaz puts the kettle on05:54
KilosMaaz coffee please05:55
MaazKilos: Righto05:55
pavlushkaSo the problem is with is?05:55
KilosMaaz large05:55
MaazIn a beer mug just for you Kilos05:55
pavlushkaMaaz large05:55
MaazIn a beer mug just for you pavlushka05:55
CryterionI always get it wrong05:55
Kilosmorning pavlushka Cryterion and other early birds05:55
CryterionMorning Kilo's05:55
pavlushkaMaaz you told it to Kilos already, not gonna fall for that :p05:55
Maazpavlushka: *blink*05:55
CryterionMaaz: I already got my own coffee :)05:56
MaazCryterion: Huh?05:56
pavlushkaHeya Kilos 05:56
pavlushkalol05:56
MaazCoffee's ready for pavlushka and Kilos!05:58
pavlushkaMaaz: ty05:58
MaazYou are welcome pavlushka05:58
KilosMaaz gracias amigo05:59
Maaz¡de nada compadre05:59
Kilosoh my you early superfly 05:59
Kiloshi thatgraemeguy 06:00
superflyKilos: I'm not here anymore...06:00
thatgraemeguymorning :)06:00
superflywe're going away for the week, I'll chat over the weekend, just needed to check some stuff on the PC06:00
superflyhi thatgraemeguy, pavlushka, Cryterion, et al06:01
Kilosgo safe and enjoy06:01
pavlushkaHello superfly :), was away with some issue07:43
Kilosthe fly has gone away for a week pavlushka 07:49
pavlushkaKilos: np, he can check back the logs if he wishes :)07:50
Kilos16.04 makes ugly emoticons07:50
Kilosbut it works well otherwise07:54
Kilosmight even do a clean install on my ssd07:54
Kilosthe 14.04 to 16.04 upgrade on this drive gave lots of probs07:55
Kiloshi drussell hows davy?07:55
paddatrapperKilos: what kind of problems? 07:56
paddatrapperAnd hey :) 07:57
Kilosi cant remember but was annoying enough to do a clean install and just rsync old home07:59
Kiloshows paddatrapper today08:00
Kilosis your hair still blue08:00
paddatrapperKilos: tips are blond. All blue has faded out.08:20
Kiloshahaha08:20
Kilosso weird, not even lunch time there and 7.20pm here08:21
paddatrapperI'm sitting in a lecture theatre for the my supposed third lecture of the day... I have had about 20 minutes of teaching out of 2.5 hours... 08:22
Kilosouch08:22
inetprogood mornings09:12
andrewlsdMorning inetpro and Kilos09:23
andrewlsdMorning inetpro and Kilos and paddatrapper09:23
andrewlsdhttp://www.minetest.net/    server on my laptop at the moment karrimor.duckdns.org:30000 09:24
andrewlsdin case anyone wants to play09:24
paddatrapperhey andrewlsd 09:32
Kiloshi andrewlsd 10:48
grembleGood afternoon everyone.13:34
grembleAny news on Kilos?13:34
superflyHi gremble, I'm not sure what you heard last. He's at home with his lady and his daughter, but he's not allowed to do anything major. 14:10
grembleAh okay. That is good news14:11
superflyAlso, the hospital has given them another two weeks to pay 14:11
grembleI hope they are able to manager14:36
gremblemanage*14:36
dlPhreakGreets16:04
paddatrapperHey dl16:09
paddatrapperdlPhreak too16:10
dlPhreakpaddatrapper: howdy16:14
inetprogood evening18:01
pavlushkagood evening!18:29
kulelu88hey pavlushka 18:34
pavlushkaHey kulelu88 :)18:34
pavlushkaping theblazehen :)18:34
pavlushkahow is it going kulelu88 ?18:35
kulelu88lekker man howzit?18:35
inetprodoes pavlushka know what lekker means even :-)19:03
kulelu88oh I assumed he is a local fellow19:03
pavlushkainetpro: lekker means good I think, but was working on a little :)19:04
pavlushkaon something, so was busy, kulelu88 fine here :)19:04
kulelu88you speak french? pavlushka 19:05
pavlushkakulelu88: may be someday :p19:06
kulelu88aah your name 'seems' French pavlushka 19:07
pavlushkakulelu88: really? after this long? when everyone stopped saying that its of Slavic?19:08
kulelu88forgive my ignorance concerning European names :P19:08
pavlushkakulelu88: so it seems to you as french, though is more or exactly Russian :)19:09
kulelu88Vladimir seems more Russian :P19:10
pavlushkalol19:12
kulelu88pavlushka: you a software engineer for ubuntu?19:13
pavlushkakulelu88: I wish :)19:14
kulelu88We need a wiki of "who is who" 19:14
inetprokulelu88: he's from Bangladesh if I remember correctly19:28
grembleWho is you?19:33
grembleAlso, hello19:33
grembleI think there is one on the ubuntu-za wiki page, kulelu88 19:33
kulelu88ow gremble my man :P #feesmustfallonlybeforefinalexams :D19:34
superflyo/19:34
* superfly has enough Internets in Struisbaai to get online for a bit19:36
grembleJust read a letter from Habib that said if there are more disruptions, Wits will close for the rest of the year.19:36
kulelu88looks like Habib and co. are holding a gun to the students heads now. The hard workers don't want to repeat the year next year19:38
kulelu88yo superfly howzit?19:42
pavlushkao/ superfly 19:42
superflykulelu88: not too bad, and yourself?19:42
kulelu88good good19:43
superflyhi pavlushka, shouldn't you be asleep already?19:43
pavlushkasuperfly: I forgot, thanks for reminding :)19:43
* pavlushka that's the reason he sleeps in the chair19:44
superflynot good for your back, pavlushka19:45
pavlushkapoint ^19:46
pavlushkasuperfly: thanks, at least some one cares about my back :)19:46
superflypavlushka: I'm a dad, it's built into me19:47
* pavlushka now leaning back19:47
paddatrapperkulelu88: problem is the protesters don't care... 19:48
pavlushkahehe, built-in Dad's functions :)19:48
kulelu88from superfly import Dad19:48
pavlushkalol19:49
kulelu88dad = Dad.care(level=9) :P19:49
superflypaddatrapper: I've actually been idling wondering how many of the protesters are actually students, and also what faculties they're from or what they are studying19:49
paddatrappersuperfly: some aren't, the leaders are UCT students. As far as I know Masixole (the main leader) is a masters student19:51
superflyah, so he's not really beholden to the same timelines as the undergrads19:51
paddatrapperI guess they're humanities students... With some others thrown into the mix 19:51
paddatrapperYup... 19:51
kulelu88I was about to jokingly say it must be humanities students19:52
* inetpro falling asleep 19:54
superflyinetpro: go to bed, old man19:55
grembleI'm just glad I've been working on skills that make me employable if it comes to the universities closing :x19:56
kulelu88if I have a global variable in my code, called "bot", how do I call that variable to my function via a Flask router? 19:57
superflywhy do you have a global variable?19:57
gremble^19:57
kulelu88gremble: the closing of the varsities is highly unlikely19:57
kulelu88superfly: just testing the concept. I will adjust later19:58
kulelu88this dude in the telegram channel gives bad coding advice :/19:58
superflykulelu88: which Telegram channel?19:58
gremblekulelu88, unlikely it might be, it is still a terrifying prospect to me.19:58
kulelu88superfly: on telegram itself. for this lib: https://github.com/python-telegram-bot/19:58
inetprosuperfly: heh! 19:59
kulelu88superfly: this is the function: https://www.zerobin.net/?99b16b6bb11140e2#yxO5eeMR744x9ZTC6wrXqMf0KZpX2S5VP8EAxO2GnM0=  . I have removed update. Now I have added a global 'bot' variable. how do I call/use it via a web/curl request? 20:01
superflyohi ludo!20:02
superflykulelu88: yeah, you've got it all wrong20:02
superflykulelu88: what he has written there is a framework for writing a bot that listens and responds to messages.20:03
superflykulelu88: Flask is a web framework20:03
superflynow you're trying to mash the two together, and you're not sure why it doesn't work20:04
kulelu88I am just using Flask for API requests to the bot20:04
superfly"API requests"?20:04
kulelu88superfly: I want my server to respond to GET, POST requests, that then pass that on to the bot to perform actions20:06
superflylike send a message to someone?20:07
kulelu88superfly: yeah, that is exactly my goal20:08
superflyhrm, this is interesting. because you've already got an event loop running for the telegram bot, and now you're trying to add an event loop for your HTTP server20:09
kulelu88superfly: 1 suggestion was to split the REST-server and bot and use the pub-sub of Redis (but that is over-engineering for now)20:11
superflykulelu88: you need to forget the extensions part of the Telegram Bot module, and use the plain old API from within Flask20:13
kulelu88superfly: it does support the regular API stuff too. I could avoid telegram.ext and just use import telegram only20:14
superflyright, 'cept your example is totally wrong (which is why you're asking)20:15
superflykulelu88: that "bot" needs to be created somewhere20:15
superflykulelu88: but there's an easy way around this, and we can hook into Python's module loading system for it too20:15
kulelu88superfly: just before the function, I made the bot here: bot = telegram.Bot(os.environ["API_TOKEN"])20:16
kulelu88so 'bot' exists 20:16
superflyright, and drop the "bot" from the arguments20:16
kulelu88oh wow, it worked now :D20:17
kulelu88darn, web programming is tough :P20:17
superflykulelu88: you also have no chat_id20:17
superflyand "update" shouldn't be there either20:17
kulelu88it's also stored as a global variable20:17
kulelu88this lib looks more suited to my needs: https://github.com/datamachine/twx.botapi20:18
superflyno, the Telegram Bot is fine, it's just engineered to be a Telegram bot and ONLY a Telegram bot20:18
superflyif you use the extensions20:19
superflyif you just use the plain old API, then you're fine20:19
kulelu88superfly: so if I don't include a variable in a function but call a variable that is defined globally, it will fetch the global value of that variable?20:19
superflyyou don't "call" a variable, you just use it20:20
kulelu88(noob question from hindsight)20:20
superflyand global means that it is visible everywhere20:20
kulelu88superfly: and why are global variables dangerous to use?20:20
superflybecause they are visible everywhere20:20
superflyand one part of the code can change the value without another part being aware of it20:21
kulelu88noted! alright, no more coding questions :P20:22
superflyand when you do that with languages like C, where string buffers need to be allocated dynamically, then you get one piece of code reading more memory than it is supposed to20:22
superflykulelu88: https://bin.snyman.info/mmmbgq2820:31
superflykulelu88: ^^ untested, but I'm sure you can make it work20:32
kulelu88superfly: so based on your code, I should not try to mesh the 2 together and instead integrate the telegram functions into my Flask REST service?20:33
superflyyes20:33
kulelu88I like that solution :thumbsup:20:33
superflykulelu88: getting somewhere?20:46
kulelu88yep, your code is always more legible. I swear you should write a book for imperative web programming! :D20:48
superflykulelu88: open a Python prompt, and type "import this" -- I don't need to write a book20:53
superfly(I'd love to write a book, and self-publish, and become $$$ RICH!!!, but I really don't know what to write about, or how to get people to like my book)20:55
superflykulelu88: I also think that knowing the tools and knowing what you are trying to do helps me to bridge the gap and show you how to achieve it20:57
superflythat largely doesn't work in book format, though20:57
kulelu88superfly: regular books are terrible, but tutorial-style (eg. let me hold your hand) books sell quite reasonably. Eg. http://nickjanetakis.blogspot.com/21:00
superflyinteresting21:05
kulelu88but I think gremble has done it already. It's quite a bit of work 21:07
grembleYou won't become rich from the book itself. But writing a book is a very good way on expanding your knowledge.21:08
grembleI would advise against self-publishing though. A good editor is worth more than gold in terms of getting a good quality book out.21:09
kulelu88gremble: (off-topic) what happens to second semester tests? will the schedule be pushed into December?21:11
gremblekulelu88, currently the exams have been extended into December. 21:12
grembleI think the last one is written the 6th21:12
grembleThat means supps will be pushed into Jan probably21:12
grembleWith summer school probably touching the start of the first semester21:12
kulelu88luckily they have such giant gaps between semesters21:13
superflygremble: you don't need to use a publisher to get a good editor21:22
superflyand from all the mistakes I've seen, there aren't many good editors out there either21:23
gremblesuperfly, you don't. But a publisher will be your best bet on getting a good one. They don't really sit around :P21:23
superflygremble: I've talked to people who have done both, and they say that you can find good editors without needing a publisher21:24
grembleI agree with that21:24
superflyheh. my brother had a fight with his English teacher in Std 6, over the spelling of the word "fulfill" - she maintained it was "fullfill" and he said it was the former. they looked it up, and he was right.21:26
grembleI've had lots of fights with math teachers xD21:27
grembleOr it could've been the same one each time, I don't know :P21:27
superflymy maths is terrible, my English is pretty decent21:28
superfly(decent enough that I'd get maybe 2 or 2 spelling errors in an entire hand-written essay)21:28
superflyugh21:28
superfly2 or 321:29
superflykeyboards are totally different :-P21:29
grembleThese days spelling is not as important as grammar and proper word choice. Some of the stuff that I've edited are the reason I'm getting grey hairs at 2521:31
kulelu88is or are? 21:32
grembleWhere?21:33
kulelu88"Some of the stuff that I've edited are the reason I'm getting grey hairs at 25" ? 21:33
grembleIn the second sentence it can be either, since stuff can be singular or plural. In this case it is plural21:33
grembleBecause I have edited more than one thing 21:33
gremble:P21:33
kulelu881 stuff? isn't stuff plural? (not criticizing, I honestly forgot the rule here)21:34
grembleHmm, yes. You are right. You wouldn't use stuff as a singular. But, "The stuff is gone." vs "the stuff are gone"21:36
grembleSo, you can use it as a grouping, where it would act as a singular.21:37
grembleLanguage is so much fun :D21:37
kulelu88the stuff is gone sounds more 'correct', but I'm not sure21:42
superflybecause "stuff" is a collective noun21:43
grembleStuff is gone, is the correct one because you are referring to a singular despite it being more than one thing. 21:43
gremblewhat superfly said :P21:44
superflygood night everyone, sleepy time for me21:44
grembleSleep well superfly 21:45

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!