/srv/irclogs.ubuntu.com/2006/09/26/#upstart.txt

=== johnnybuoy [n=void@unaffiliated/johnnybuoy] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
=== j_ack [n=rudi@p508D9DD1.dip0.t-ipconnect.de] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== fdoving [n=frode@ubuntu/member/frode] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== fdoving [n=frode@ubuntu/member/frode] has joined #upstart
=== imbrandon [n=imbrando@ubuntu/member/pdpc.active.imbrandon] has joined #upstart
=== Admiral_Chicago [n=freddy@st0660990722.monm.edu] has joined #upstart
=== maro_ [n=mark@0x55511dab.adsl.cybercity.dk] has joined #upstart
=== juergbi [n=juerg@80-219-26-249.dclient.hispeed.ch] has joined #upstart
=== imbrandon [n=imbrando@ubuntu/member/pdpc.active.imbrandon] has joined #upstart
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
=== Ingmar [n=ingmar@248.221-241-81.adsl-dyn.isp.belgacom.be] has joined #upstart
=== Ingmar is now known as Ingmar^
_ionAny freenet 0.7 users?02:15
=== johnnybuoy [n=void@unaffiliated/johnnybuoy] has joined #upstart
=== Amaranth_ [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Amaranth_ is now known as Amaranth
=== Admiral_Chicago [n=freddy@st0660990722.monm.edu] has joined #upstart
=== j_ack [n=rudi@p508D86D9.dip0.t-ipconnect.de] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== wasabi_ [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== Ingmar^ [n=ingmar@vpna127.ugent.be] has joined #upstart
=== fatal__ [i=gem@gamezone.fjortis.info] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== j_ack [n=rudi@p508D86D9.dip0.t-ipconnect.de] has joined #upstart
_ionhttp://johan.kiviniemi.name/software/random-background/random-background07:50
Keybukhmm?07:56
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
_ionSorry, that was offtopic. :-)08:08
_ionJust something i wrote just now.08:08
Artanicusseems you realy like ruby.. (:08:08
KeybukI've yet to learn ruby08:09
Keybukon first glance, it seems a little Python like, but without the nice syntax08:09
_ionkeybuk: Some propaganda: http://johan.kiviniemi.name/stuff/python-ruby/ :-)08:24
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
KeybukTo get away with less typing, many Python programmers resort to making variables09:09
Keybuk(and methods) public even when there's no reason for them to be public.09:09
Keybukthat's not true09:09
KeybukPython actively discourages private anything, with the "programmers are consenting adults" theory09:09
Keybuk__ is just a name-mangler09:11
Keybukclass Foo:def __*(foo)09:11
Keybukjust makes the method called __Foo_foo09:11
Keybukso in your example, world.__World_double() is an entirely legal call to get at the "private" method09:11
Keybukin general, that seems to be just a comparison of syntax though09:13
Keybukwhat's different about the /language/09:13
Keybukie. what can I do in Ruby that I cannot do in Python?09:13
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
=== cortana [n=sam@pc-62-31-146-25-ga.blueyonder.co.uk] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
LarstiQ_ion: I'd also disagree with that section on private methods, it doesn't reflect python reality09:27
LarstiQ_ion: on len(obj) vs obj.len(), not sure if that is the reason, but len() will try a couple of different approaches09:28
=== LarstiQ blinks
Keybuklen is a built-in function09:31
LarstiQ_ion: also problems with "self", notation of instance variables and an example of a class09:31
Keybukit just calls obj.__len__()09:31
LarstiQKeybuk: afaik, it can handle __len__ not being there if it has __getitem__09:31
Keybukit's a shame they didn't just make it a default len() method, but then early Python wasn't as "everything is an object" as modern python09:31
LarstiQbut yes, that might have something to do with it too09:32
=== LarstiQ agrees it is not consistent but doesn't care that much
=== j_ack [n=rudi@p508D86D9.dip0.t-ipconnect.de] has joined #upstart
_ion0) "Python actively discourages private anything"  yes, therefore i like Ruby more. :-) If you like Python more, that's your right. 1) Everything you can do in Ruby, you can do in Python, C, Haskell, Java, Lisp, 68000 asm etc. They are just different. Well, Python doesn't support closures. That's actually a very big win in my opinion. Some people don't regard them as useful (often Python advocates, it seems), and that's their right.10:42
_ionThat page is just my personal opinion, and everyone has (and should have) one. :-)10:42
Keybuk"closures" ?10:43
_ionhttp://martinfowler.com/bliki/Closure.html10:44
LarstiQpython does support closures afaik10:45
=== LarstiQ reads the link
_ionCreating and referencing functions inside a function does not equal a closure.10:45
_ionhttp://mail.python.org/pipermail/python-list/2004-July/229478.html10:45
Keybukhttp://ivan.truemesh.com/archives/000392.html10:45
Keybukthat page gives you the Python examples10:46
Keybukok, so Ruby has first-class closures10:46
_ionIf you read that page, you'll notice all the examples are oneliners.10:46
Keybukwhat does Python have that Ruby doesn't?10:46
_ionThat is not very handy. Python has lambda, but it doesn't support multiline code.10:47
_ionWell, currently Python is faster.10:47
LarstiQexplicitly by choice.10:47
Keybukis everything in Ruby also an introspectable object?10:47
_ionRuby 2.0 will have a new, fast VM.10:47
LarstiQ_ion: I'm fine with opinions, but your examples are not how one would write python code, so it's not a fair comparison.10:47
LarstiQKeybuk: yes, and you can change the builtin types10:48
_ionThose are examples of how i would write python code. :-)10:48
Keybukso functions are objects, which you can add methods to, or replace?10:48
LarstiQ_ion: right, you're more writing ruby in python then10:48
Keybukso to make some Ruby code up10:48
Keybukclass Random10:48
Keybuk  def initialize10:48
_ionlarstiq: No. I first learned Python, then found Ruby.10:48
Keybuk    @foo = @bar10:49
Keybuk  end10:49
Keybuk  def bar10:49
Keybuk    ...10:49
Keybuk  end10:49
LarstiQ_ion: so? It's not pythonic10:49
Keybukend10:49
KeybukRandom.new.foo10:49
Keybukdoes that work?10:49
=== LarstiQ is too weak in ruby to say
LarstiQKeybuk: one thing that python has is more libraries10:50
KeybukLarstiQ: meh, Python's standard libraries SUCK10:50
_ion@bar (an instance variable) and Random#bar (a method) are different.10:50
_ionclass Random10:50
Keybukthe most irregularly inconsistent mish-mash of crack on earth10:50
_ion  attr_reader :bar10:50
_ion  def initialize10:50
_ion    @bar = 4210:50
_ion  end10:50
_ionend10:50
_ionRandom.new.bar returns 4210:50
LarstiQKeybuk: that may be, ruby has less available10:50
Keybuk_ion: that's not what I mean10:51
Keybukcould I go  #foo = #bar10:51
Keybukie. create a new method foo that's a copy of the bar method?10:51
LarstiQruby has a distinction beween instance and module attributes, (and private/public), which is something I don't like10:52
Keybuk(and ruby doesn't appear to be able to spell "initialise" :p)10:52
_ionclass Random10:52
_ion  def bar10:52
_ion    4210:52
_ion  end10:52
_ionend10:52
_ionRandom.class_eval { alias :foo :bar }10:53
Keybuk_ion: can I do Random.foo = Random.bar10:53
_ionRandom.new.foo  # 4210:53
Keybukright10:53
Keybukso it appears that a major feature Python has over Ruby is that everything, including methods, is an object10:53
Keybukand that everything is introspectable10:53
KeybukRuby appears to lack that10:53
Keybuka method in Python is just an object of a particular type that implements a __call__ method that executes the attached Python bytecode, etc.10:55
Keybukoh, another way of doing closures in Python, apparently:10:55
Keybukdef foo(self, a, b, c):10:55
Keybuk  def closure():10:56
Keybuk    return a10:56
Keybuk  some_call(closure)10:56
LarstiQthat would be _the_ way to do closures?10:56
LarstiQalthough 2.5 has partial()10:56
Keybukthat has the same "is executed in the namespace of the calling function" requirements10:56
Keybukof course, the key point about any language is the applicability of that language for certain tasks11:00
Keybukif you're doing low-level systems programming, then you write it in C11:00
Keybukif you're doing any kind of text munging, you write it in Perl11:00
KeybukPython seems to be winning for rapid tool and application creation11:00
Keybukthere's a battle between C# and Python for "best GUI development" language11:01
KeybukI've not yet seen anything that makes web apps easy11:01
KeybukPerl, PHP and Python all seem equally bad at it11:03
KeybukRuby on Rails seems popular this week11:03
Keybukthough I must admit, from looking at the code of Typo, I can't see why11:03
LarstiQheh, Typo is in ruby and Typo3 in php? Joy :)11:04
SeveasKeybuk, ever looked at django for webapps?11:10
Amaranthdjango is the shit11:11
Amaranthand it's been around quite some time so it's not just a fad11:11
Seveas(the django lead dev uses ubuntu ;))11:11
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== j_ack [n=rudi@p508D86D9.dip0.t-ipconnect.de] has joined #upstart

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