code logs -> 2014 -> Tue, 17 Jun 2014< code.20140616.log - code.20140618.log >
--- Log opened Tue Jun 17 00:00:05 2014
00:21 Turaiel[Offline] is now known as Turaiel
00:44 Derakon[AFK] is now known as Derakon
00:56 * Derakon looks up.
00:56
<&Derakon>
"Object-oriented" programming could also be described as "modular" programming.
00:56
<&Derakon>
In the sense that the goal is to be able to chop up your program into nominally-independent bits so that if you have to change one aspect of it, you know what other aspects will be affected.
00:56
<&Derakon>
Of course, you can write spaghetti code in any language or design approach.
00:57
<&McMartin>
Modular programming predates OO.
00:57
<&Derakon>
In bad OO, that generally consists of making all your fields public (or similarly having lots of direct field access and reliance on implicit functionality)
00:57
<&Derakon>
McM: sure, OO is just a specific formalization of the concept.
00:58
< Nemu>
Then there may be other formalizations that are more suited to some scenarios, no?
00:58
<&Derakon>
Yep.
00:58
<&Derakon>
For example, Model/View/Controller.
00:58
<&McMartin>
MVC is generally done with OO.
00:58
< Nemu>
Hmm. I didn't realize that was a separate formalization
00:58
<&McMartin>
(I would say OO is modules + virtual functions)
00:58
< Nemu>
I know of views from python
00:58
<&McMartin>
Different "View"
00:59
<&McMartin>
That view is a way to get around multiple inheritance being shit
00:59
<&McMartin>
This view is "the part of the program responsible for the gui"
00:59
< Nemu>
Really? I thought that view was intended to break data from it's representation
00:59
< Nemu>
They python view
00:59
< Nemu>
*the]
00:59
< Nemu>
...
01:00 * Derakon checks what Python views are.
01:00
<&Derakon>
Ah.
01:00
<&McMartin>
Ssorta
01:00
<&McMartin>
I'm a little rusty here too
01:00
<&McMartin>
OO "view" in general isn't the MVC view though
01:00
<&Derakon>
This is more like "you can limit the scope of your operations to a subset of the data".
01:00
<&Derakon>
Whereas the view in MVC is more "this is how you expose the data to the user".
01:00
<&McMartin>
Yeah, now that I think about it, classical OO view is for statically typed OO, which Python isn't.
01:00
<~Vornicus>
My Verb Cats
01:01
<&McMartin>
It's where instead of deriving from A and B, you derive from only A and have an asB() method that returns a B backed by you.
01:01
<&Derakon>
McM: yeah, classic OO requires some form of data hiding to really work.
01:01
<&McMartin>
asB() gives you a B "view"
01:01
<&Derakon>
Python OO is more "polite" OO, i.e. "I have these fields, but I request that you ignore them in preference for these methods."
01:01
<&McMartin>
Objects in general are a clumsy substitute for closures, with one handy scope hack~
01:01
<&Derakon>
Heh.
01:03
< Nemu>
Ah, yeah, that actually bothers me about Python
01:03
< Nemu>
Too easy to poke something that shouldn't be poked as a quick fix, for example
01:48
<@celticminstrel>
Though the obfuscation of names beginning with __ probably makes it hard to poke at private fields?
01:48
<@celticminstrel>
But not impossible, probably.
01:48
<@celticminstrel>
Of course, this assumes the class names its private fields something starting with __
01:49
<&Derakon>
It doesn't make it hard at all. Double-underscore is a convention, nothing more.
01:49
<&Derakon>
It's like putting a "please don't open" notice on a door, instead of using a lock.
01:49
<@celticminstrel>
If you name a class member __var, you can't access it via instance.__var.
01:50
<@celticminstrel>
I think you can access it by instance.<something>__var though
01:50
<@celticminstrel>
Where <something> isn't specified.
01:50 JetpackWearingFireBreathingTRex [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Operation timed out]
01:50
<@celticminstrel>
Might be the class name, or a random string...
01:56
<&Derakon>
If nothing else, you should be able to use instance.__dict__["__var"].
01:57
<&Derakon>
Which is a hell of a lot easier than using, say, Java's introspection and accessibility-modification functions.
02:03
<&McMartin>
Those still make it possible. In C++ (or C if you mimic this effect) you literally cannot do this without knowing how the compiler lays stuff out.
02:04
<@celticminstrel>
Dunno if __dict__ works there, actually.
02:04
<@celticminstrel>
Maybe it does,
02:08 io\USA is now known as iospace
02:09
<&Derakon>
>>> class Foo:
02:09
<&Derakon>
... def __init__(self):
02:09
<&Derakon>
... self.__foo = 1
02:09
<&Derakon>
...
02:09
<&Derakon>
>>> foo = Foo()
02:09
<&Derakon>
>>> foo.__dict__
02:09
<&Derakon>
{'_Foo__foo': 1}
02:09
<&Derakon>
So it kind of works.
02:09
<&Derakon>
The name gets mangled, but it's there.
02:12
<@celticminstrel>
Yeah, that's what I was trying to say.
02:12
<@celticminstrel>
Seems silly to use the classname for the mangling though. Ah well.
02:13
<&Derakon>
It's guaranteed to be unique in local scope, which is all you need.
02:24 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
02:41 Kindamoody[zZz] is now known as Kindamoody
03:26 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:55 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has quit [[NS] Quit: Going dooooown...]
04:13 Thalass [thalass@Nightstar-1enuc9.bigpond.net.au] has joined #code
04:14 mode/#code [+o Thalass] by ChanServ
04:26 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has joined #code
04:27 mode/#code [+o Orthia] by ChanServ
05:04 Derakon is now known as Derakon[AFK]
05:13 Netsplit *.net <-> *.split quits: @ErikMesoy, @Namegduf, simon_, @Alek, @celticminstrel, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
05:14 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+4 more)
05:17 Netsplit *.net <-> *.split quits: @ErikMesoy, @Namegduf, simon_, @Alek, @celticminstrel, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
05:18 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+4 more)
05:31 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.]
05:36 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code
06:06 Turaiel is now known as Turaiel[Offline]
06:07 Kindamoody is now known as Kindamoody|nap
06:29 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has quit [Ping timeout: 121 seconds]
06:33 Orthia [orthianz@Nightstar-b5s.sgu.224.119.IP] has joined #code
06:33 mode/#code [+o Orthia] by ChanServ
06:46 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @Namegduf, simon_, @celticminstrel, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
06:47 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+4 more)
06:55 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @Namegduf, simon_, @celticminstrel, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
06:58 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+4 more)
07:03 macdjord is now known as macdjord|slep
07:17 celticminstrel [celticminst@Nightstar-m2a422.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:51 Kindamoody|nap is now known as Kindamoody
09:04 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code
09:07 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [Connection closed]
09:07 Orthia [orthianz@Nightstar-b5s.sgu.224.119.IP] has quit [Ping timeout: 121 seconds]
09:09 NSGuest44827 [Datawalke@Nightstar-kt8k7i.com] has quit [Ping timeout: 121 seconds]
09:10 Datawalke [Datawalke@Nightstar-kt8k7i.com] has joined #code
09:11 Datawalke is now known as NSGuest45219
09:11 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has joined #code
09:11 mode/#code [+o Orthia] by ChanServ
09:26 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code
09:48 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving]
09:56 Kindamoody is now known as Kindamoody|out
10:12 mode/#code [+o RchrdB] by ChanServ
10:17 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, [R], (+3 more, use /NETSPLIT to show all of them)
10:18 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+3 more)
10:37 JetpackWearingFireBreathingTRex [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
10:37 mode/#code [+o JetpackWearingFireBreathingTRex] by ChanServ
11:01 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
11:21 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
11:52 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
11:55 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
11:58 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
12:00 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
12:01 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
12:07 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
12:08 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
12:14 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
12:15 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:15 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
--- Log closed Tue Jun 17 12:18:06 2014
--- Log opened Tue Jun 17 12:20:31 2014
12:20 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
12:20 Irssi: #code: Total of 38 nicks [18 ops, 0 halfops, 0 voices, 20 normal]
12:20 mode/#code [+o TheWatcher] by ChanServ
12:21 Irssi: Join to #code was synced in 35 secs
--- Log closed Tue Jun 17 12:22:20 2014
--- Log opened Tue Jun 17 12:22:29 2014
12:22 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
12:22 Irssi: #code: Total of 38 nicks [18 ops, 0 halfops, 0 voices, 20 normal]
12:22 mode/#code [+o TheWatcher] by ChanServ
12:23 Irssi: Join to #code was synced in 35 secs
12:49 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
12:50 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
12:59 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
13:00 Netsplit over, joins: @Namegduf, Syka, [R], &jeroud, &Derakon[AFK], @froztbyte, Xires, simon_, &jerith, @Alek (+4 more)
13:46 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
13:47 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
13:55 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
13:56 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
14:04 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
14:06 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
14:14 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
14:15 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
14:23 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
14:24 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
15:55 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @JetpackWearingFireBreathingTRex, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, (+4 more, use /NETSPLIT to show all of them)
15:56 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @JetpackWearingFireBreathingTRex, @Namegduf, [R], Xires (+4 more)
16:15 JetpackWearingFireBreathingTRex [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
16:23 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, [R], (+3 more, use /NETSPLIT to show all of them)
16:24 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+3 more)
16:32 Netsplit *.net <-> *.split quits: @ErikMesoy, @Alek, @Namegduf, simon_, Syka, Xires, @froztbyte, luke, @Azash, [R], (+3 more, use /NETSPLIT to show all of them)
16:33 Netsplit over, joins: &jeroud, &jerith, @Alek, Syka, &Derakon[AFK], @froztbyte, @Namegduf, [R], Xires, simon_ (+3 more)
16:38 celticminstrel [celticminst@Nightstar-m2a422.dsl.bell.ca] has joined #code
16:38 mode/#code [+o celticminstrel] by ChanServ
17:12 Thalass [thalass@Nightstar-1enuc9.bigpond.net.au] has quit [Ping timeout: 121 seconds]
17:24 JetpackWearingFireBreathingTRex [Z@Nightstar-ro94ms.balk.dk] has joined #code
17:24 mode/#code [+o JetpackWearingFireBreathingTRex] by ChanServ
17:37 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Connection reset by peer]
17:41 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
17:59 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
18:01 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
19:02 Kindamoody|out is now known as Kindamoody
20:17 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:17 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:36 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
21:06 Kindamoody is now known as Kindamoody[zZz]
21:28 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
21:29 Syloq [Syloq@Nightstar-mbk.c3p.254.173.IP] has joined #code
21:29 mode/#code [+o Syloq] by ChanServ
21:39 Xires is now known as ^Xires
21:52 ^Xires is now known as Xires
22:36 gnolam [lenin@Nightstar-ii43bc.cust.bredband2.com] has joined #code
22:36 mode/#code [+o gnolam] by ChanServ
22:53 gnolam [lenin@Nightstar-ii43bc.cust.bredband2.com] has quit [[NS] Quit: Gone]
22:57 Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
23:00 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
23:00 mode/#code [+o Reiv] by ChanServ
23:04 JetpackWearingFireBreathingTRex [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds]
23:23
<&McMartin>
A question for the channel, particularly those nearer to their student years than me
23:23
<&McMartin>
Do you guys have any book recommendations for a skilled programmer learning C++?
23:24
<&McMartin>
I'm pointing them at Stroustrup's tome, but it seems like there might be others.
23:42
<@Azash>
McMartin: I'm hosting one
23:42
<@Azash>
http://cs.helsinki.fi/u/lindert/ticpp/
23:52
<&ToxicFrog>
McMartin: I have no recommendations there other than "don't do what I did"
23:53
<&ToxicFrog>
(i.e. learn it as you go hacking on a giant special-purpose OS written entirely in C++)
--- Log closed Wed Jun 18 00:00:33 2014
code logs -> 2014 -> Tue, 17 Jun 2014< code.20140616.log - code.20140618.log >

[ Latest log file ]