/srv/irclogs.ubuntu.com/2012/05/18/#ubuntu-my.txt

=== apogee is now known as ApOgEE
ApOgEEsalam 05:03
excalibrApOgEE~07:14
ApOgEEoit excalibr 07:18
excalibrlama tak nampak kat sini07:18
ApOgEEbizi07:19
excalibrprojek penuh tangan eh07:19
excalibrhehe07:19
ApOgEEboleh la.. alhamdulillah07:19
ApOgEEapa cerita07:20
ApOgEE?07:20
fairuzsalam, helo rakan207:21
ApOgEEhttp://tolololpedia.wikia.com/wiki/Halaman_Utama07:27
ApOgEEsalam fairuz 07:27
fairuzwsalam ApOgEE07:28
fairuzwebsite apa tu ApOgEE07:31
ApOgEEhaha... entah hapa tah07:34
ApOgEEhttp://tolololpedia.wikia.com/wiki/Bahasa_Kelantan07:40
ApOgEEentah apa2 entah07:40
excalibrhahaha07:45
excalibrlwk la pulak07:45
fairuzhaha07:53
ApOgEEasalnya aku jumpa mende ni http://uncyclopedia.wikia.com/wiki/Main_Page08:02
ApOgEEwiki yang karut ... haha08:02
excalibreh yg *dramatica tu dah takde ke08:04
excalibrlupa nama wiki tu08:05
ApOgEEhttp://encyclopediadramatica.se/Main_Page08:08
excalibrApOgEE: ko reti python kan? nak tanya byk soalan newbie boleh tak08:09
ApOgEEexcalibr: tanya la08:13
excalibraku baru berjinak2 dgn py. skrg stuck degn konsep class :(08:16
excalibrapa tujuan prefix "self." kat variabe dlm func dlm class08:16
ApOgEEself tu maksudnya instance class tersebut08:18
excalibrmmg kena letak ke08:19
excalibryg self kat def tu pulak? def play(self):08:20
ApOgEEia untuk variable yg ko nak pakai kat dalam kelas tersebut08:20
ApOgEEself tu merujuk kepada instance kelas ko08:20
ApOgEEmisalnya ko buat kelas kereta08:21
ApOgEEkelas tu hanya acuan..08:21
ApOgEEbila ko instantiate class tu, ia jadi objek08:21
ApOgEEobjek tu la yang ko guna untuk method dan variable yg ada dlm kelas08:21
ApOgEEcth: class kereta08:22
ApOgEEobjek: kancil = new kereta08:22
ApOgEEobjek 2: kenari = new kereta08:22
ApOgEEobjek 3: kelisa = new kereta08:23
ApOgEEself merujuk kepada objek kancil, kenari atau kelisa08:23
excalibrmm..i think i get the idea08:24
ApOgEEbagus08:24
ApOgEEself is an object reference to the object itself, therefore, they are same. Python methods are not called in the context of the object itself. self in Python may be used to deal with custom object models or something.08:25
excalibrvariable yg kita set dlm func tu global ke08:25
excalibrboleh di akses dari func lain dlm class tu?08:26
ApOgEEya, variable tu boleh diakses08:31
ApOgEEexcalibr: ni contoh http://pastebin.ubuntu.com/993823/08:37
excalibrbaiknya cikgu ni siap bagi contoh lol08:37
ApOgEEhehehe08:38
ApOgEEtakut tak paham...08:38
excalibroh tulis print(..) pun boleh gak eh08:40
ApOgEEaku kenkadang tersasul guna bahasa Gallifreyan, tu yg takut orang tak paham tu.. :P08:42
excalibrhaha08:43
fairuzonline compiler/intepreter http://ideone.com/Gg0xs  :)08:43
excalibryg variable scope tadi tu08:43
excalibrglobal dlm satu script tu ke atau class tu je..klu nak buat local..scope dlm def atau class08:44
ApOgEEfairuz: cool...08:44
excalibrcamna?08:44
ApOgEEexcalibr: global dalam skrip tu pun boleh.. yg penting ko letak object name kat depan... mcm cth aku mm.myval tu08:46
ApOgEEmyval tu adalah variable dalam kelas kereta yg dicipta ketika __init__08:46
ApOgEEkemudian aku boleh panggil/guna dalam function tambah dlm kelas sama dgn guna self.08:47
ApOgEEkemudian aku boleh guna dalam skrip juga dgn letak nama objek 'mm' kat depan dia08:47
ApOgEEso, kat mana lagi nak diglobalkan?08:48
ApOgEEluar skrip?08:48
excalibrjap.. init ni otomatik di call ke masa kita run mm = kereta()08:49
fairuzexcalibr: Pakai py untuk apa tu.09:42
ApOgEEexcalibr: __init__ tu class constructor. ko tau object oriented tak? kalo tak tau, sila buat homework.. 10:08
ApOgEEok, aku nak balik dah.. see u later10:08
excalibrfairuz: saje-saje belajar..buat scripting kat server11:21
fairuzoo11:52
fairuzsampai pakai class tu buat scripting. :D11:53
fairuzwb EgyParadox12:04
EgyParadoxthanks fairuz 12:04
fairuzEgyParadox: I think you always hang out on #git? Please teach me how to push a new change on gerrit. :)12:06
EgyParadoxno I sadly dnt12:06
fairuzOh, it was hyperair, sorry :)12:07
fairuzhyperair: ping12:07
excalibrfairuz: curious sbnarnya..tengok skrip org lain ada class..aku tak pernah main dgn oop12:12
excalibrtbh12:12
fairuzoo12:13
fairuzAku slalu scripting pakai bash ja. :) Tak pernah lagi scripting pakai python. Pakai python untuk buat graph ada la.12:13
excalibrumm bash ok la..tapi ada benda tak leh buat dgn bash12:15
excalibrmcm floating point arithmetic12:16
fairuzexcalibr: yup betul. Aku setakat nak launch beberapa command dengan nak buat processing log ja13:07
fairuztak buat kira2 yang precise sangat13:07
fairuzexcalibr: tapi untuk float, bleh pakai bc13:11
fairuzcontoh mcm echo '4/5' | bc -l13:12
penreturns\o/13:54
hyperairfairuz: pong13:58
fairuzhyperair: Baru nak tanya pasal gerrit, tapi mcm dah ok. :)13:58
hyperairoh okay =)13:59
hyperairi haven't used gerrit before, so can't help anyway13:59
fairuz:)13:59
fairuzBy the way, I have this commit-msg hook where it adds a change-id (for gerrit). I just added this hook, so my old commits don't have the change-id in them. How to make git apply the hook to the old commits? A rebase?14:02
penreturnsoh14:03
penreturnssalah masok channel14:04
hyperairfairuz: filter-branch14:06
hyperairfairuz: but i don't think you can use the hook as is without modifications.14:06
fairuzhmm14:11
fairuzI will try to rebase first since it's easy and I can see if the hooks are called or not.14:26
fairuzhyperair: Normally, why people use filter-branch?14:26
fzlamnwoot woot...14:39
fairuzfzlamn: woot14:40
penreturnsweewweetttttttttttttttt14:40
fzlamnoit.. ko buat apa? layan radio ek.14:42
penreturnshaah14:43
penreturnshehhehe14:43
penreturnsngan susah sebut kat wassap14:43
penreturns:p14:43
hyperairfairuz: because filter-branch is automated?23:20
hyperairfairuz: with rebase you would need to commit --amend each one.23:20
hyperairalso, if you don't do your rebases correctly, you'll end up squashing your history into a flat one23:21

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