From Daryl.Tester at iocane.com.au Mon Oct 2 02:30:48 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Mon, 02 Oct 2006 10:00:48 +0930 Subject: [sapug] Erlang, the movie. Message-ID: <45205DB8.3000109@iocane.com.au> A small movie put together by the Erlang guys to show off the language's "features". http://video.google.com.au/videoplay?docid=-5830318882717959520 Maybe it's just me, but the guy giving the bulk of the presentation reminds me too much of Graham Chapman. Tangentially related - I've always been fascinated by systems which are designed to be "long lived runners"; that is, systems that run for the uptime of the machine that they're on. Just the mindset required to achieve this interests me - for example: *) The ability to adjust the configuration on the fly. *) The ability to modify the software on the fly. The second point is why I'm so keen to stick a REPL interpreter into some of the applications I've been working on, and Python's reference counting helps with this. Because functions and classes are first class objects, you can do cunningness like taking a reference to the function/class, load in the new version of module and still be able to access the existing code. e.g. given - m.py: # Module version 1 def x(): print 'version 1' >>> import m >>> x1 = m.x >>> m.x() version 1 >>> x1() # equivalent version 1 modify m.py: # Module version 2 def x(): print 'version 2' >>> reload (m) >>> m.x() version 2 >>> x1() version 1 It should be possible to set up a "transaction in progress" to continue being processed "the old way", while new transactions are processed by the new methods. Randmon thoughts on a sunny public holiday ... -- Regards, Daryl Tester, IOCANE Pty. Ltd. From steve at adam.com.au Mon Oct 2 08:03:14 2006 From: steve at adam.com.au (stephen white) Date: Mon, 2 Oct 2006 15:33:14 +0930 Subject: [sapug] Erlang, the movie. In-Reply-To: <45205DB8.3000109@iocane.com.au> References: <45205DB8.3000109@iocane.com.au> Message-ID: <7FFDFE7C-B68F-4FE5-915B-2C98D2E8B25A@adam.com.au> On 02/10/2006, at 10:00 AM, Daryl Tester wrote: > Maybe it's just me, but the guy giving the bulk of the presentation > reminds me too much of Graham Chapman. You weren't kidding! As soon as he appeared, I thought he was going to say something about precious sperm! Erlang, Dylan and OCaml are on my "interesting languages" list, but I never seem to get around to them as I can do everything I want with my current software stack of Objective C and Smalltalk on Cocoa within a single run-time. http://www.fscript.org/documentation/index.htm I would be interested in replacing Smalltalk with Ruby, but am not willing to give up the interactivity of a single runtime and automatically picking up Objective C objects. I should make a movie and post it up... > The second point is why I'm so keen to stick a REPL interpreter > into some of the applications I've been working on, and Python's An interpreter in an interpreter? How about dropping back a level and writing the interpreter that should have been done, therefore making Python obsolete? :) You could call it something beginning with ++"P", so R.... Ryby? :) -- steve at adam.com.au From nepbabu.cx at gmail.com Mon Oct 2 11:45:34 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Mon, 02 Oct 2006 19:15:34 +0930 Subject: [sapug] hello everyone Message-ID: Hi everybody, Just joined sa python user group. Just a student learning Python. Hopefully, I'll learn something new here and be able to give as well. Glad to be hear. :) -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From Daryl.Tester at iocane.com.au Mon Oct 2 22:18:05 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Tue, 03 Oct 2006 05:48:05 +0930 Subject: [sapug] Erlang, the movie. In-Reply-To: <7FFDFE7C-B68F-4FE5-915B-2C98D2E8B25A@adam.com.au> References: <45205DB8.3000109@iocane.com.au> <7FFDFE7C-B68F-4FE5-915B-2C98D2E8B25A@adam.com.au> Message-ID: <452173FD.60402@iocane.com.au> stephen white wrote: >> The second point is why I'm so keen to stick a REPL interpreter >> into some of the applications I've been working on, and Python's > An interpreter in an interpreter? No, access to the *underlying* interpreter. It's an old LISP trick, except LISP provides it as part of the environment (as does Smalltalk). -- Regards, Daryl Tester, IOCANE Pty. Ltd. From Daryl.Tester at iocane.com.au Mon Oct 2 22:19:22 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Tue, 03 Oct 2006 05:49:22 +0930 Subject: [sapug] hello everyone In-Reply-To: References: Message-ID: <4521744A.9070106@iocane.com.au> nepBabu.cx wrote: > Just a student learning Python. Well, we're all that. :-) (except the trolls ...) Enjoy your stay. -- Regards, Daryl Tester, IOCANE Pty. Ltd. From nepbabu.cx at gmail.com Tue Oct 3 03:55:34 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Tue, 03 Oct 2006 11:25:34 +0930 Subject: [sapug] hello everyone In-Reply-To: <4521744A.9070106@iocane.com.au> References: <4521744A.9070106@iocane.com.au> Message-ID: <4521C316.9000807@gmail.com> Daryl Tester wrote: > nepBabu.cx wrote: > >> Just a student learning Python. > > Well, we're all that. :-) (except the trolls ...) I guess every list gets that. ~:) > Enjoy your stay. Thanks. :) btw, this list doesn't seem to be so populated with people ? The gaps between the posts are very intermittent ? -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From chris at inetd.com.au Tue Oct 3 04:06:42 2006 From: chris at inetd.com.au (Chris Foote) Date: Tue, 3 Oct 2006 11:36:42 +0930 (CST) Subject: [sapug] hello everyone In-Reply-To: <4521C316.9000807@gmail.com> References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> Message-ID: On Tue, 3 Oct 2006, nepBabu.cx wrote: > btw, this list doesn't seem to be so populated with people ? > The gaps between the posts are very intermittent ? It's very small - started from an email discussion on LinuxSA. How did you come across the list ? -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From nepbabu.cx at gmail.com Tue Oct 3 04:56:14 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Tue, 03 Oct 2006 12:26:14 +0930 Subject: [sapug] hello everyone In-Reply-To: References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> Message-ID: Chris Foote wrote: > On Tue, 3 Oct 2006, nepBabu.cx wrote: > >> btw, this list doesn't seem to be so populated with people ? >> The gaps between the posts are very intermittent ? > > It's very small - started from an email discussion on LinuxSA. > > How did you come across the list ? through gmane.org I have been learning Python for the past 1.5 year or so but never really had a chance to involve myself in anything larger than 50-60 lines of code per module. :) besides, being in University, there's also not much time. -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From chris at inetd.com.au Tue Oct 3 06:03:17 2006 From: chris at inetd.com.au (Chris Foote) Date: Tue, 3 Oct 2006 13:33:17 +0930 (CST) Subject: [sapug] Erlang, the movie. In-Reply-To: <45205DB8.3000109@iocane.com.au> References: <45205DB8.3000109@iocane.com.au> Message-ID: On Mon, 2 Oct 2006, Daryl Tester wrote: > A small movie put together by the Erlang guys to show off the > language's "features". > > http://video.google.com.au/videoplay?docid=-5830318882717959520 > > Maybe it's just me, but the guy giving the bulk of the presentation > reminds me too much of Graham Chapman. hehe... Reminds me of documentaries from the 70's :-) Love the credits music at the end. > Tangentially related - I've always been fascinated by systems which > are designed to be "long lived runners"; that is, systems that run > for the uptime of the machine that they're on. Just the mindset > required to achieve this interests me - for example: > > *) The ability to adjust the configuration on the fly. > > *) The ability to modify the software on the fly. Actually, another use is simply to inspect values at runtime for debugging purposes. i.e. Something goes wrong, so you connect to the running interpreter in the same environment as the program, and print values of things to find out why something didn't work as expected. The voice peering project I'm working on has an embedded interpreter running in a seperate thread in 'screen' sessions (using code.interact() ) for each component of the distributed application. If something strange happens, I just resume one of the screen sessions, and then use the interpreter to check objects out. > The second point is why I'm so keen to stick a REPL interpreter > into some of the applications I've been working on, and Python's > reference counting helps with this. Because functions and classes > are first class objects, you can do cunningness like taking a > reference to the function/class, load in the new version of module > and still be able to access the existing code. Yep, very cool. It's a shame that it's not usable outside of reloading a module: >>> class C(object): ... def method(self): ... return '1st method version' ... >>> c = C() >>> c.method() '1st method version' >>> >>> def newmethod(self): ... return '2nd method version' ... >>> C.method = newmethod >>> >>> c.method() '2nd method version' >>> i.e. existing object uses new version of method. Maybe there is another way to do it. > It should be possible to set up a "transaction in progress" to > continue being processed "the old way", while new transactions > are processed by the new methods. The Common LISP object system has a nifty way to upgrade existing objects by invoking a 'class-changed' method.[1] CL makes my brain hurt :-( [1] PDF Pg16 http://www.dreamsongs.com/Files/ECOOP.pdf -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From chris at inetd.com.au Tue Oct 3 06:26:39 2006 From: chris at inetd.com.au (Chris Foote) Date: Tue, 3 Oct 2006 13:56:39 +0930 (CST) Subject: [sapug] Erlang, the movie. In-Reply-To: <7FFDFE7C-B68F-4FE5-915B-2C98D2E8B25A@adam.com.au> References: <45205DB8.3000109@iocane.com.au> <7FFDFE7C-B68F-4FE5-915B-2C98D2E8B25A@adam.com.au> Message-ID: On Mon, 2 Oct 2006, stephen white wrote: > Erlang, Dylan and OCaml are on my "interesting languages" list, but I > never seem to get around to them as I can do everything I want with > my current software stack of Objective C and Smalltalk on Cocoa > within a single run-time. > > http://www.fscript.org/documentation/index.htm > > I would be interested in replacing Smalltalk with Ruby, but am not > willing to give up the interactivity of a single runtime and > automatically picking up Objective C objects. I should make a movie > and post it up... That would be good - it looks interesting. It's a shame that it's Mac specific though :-( >> The second point is why I'm so keen to stick a REPL interpreter >> into some of the applications I've been working on, and Python's > > An interpreter in an interpreter? How about dropping back a level and > writing the interpreter that should have been done, therefore making > Python obsolete? :) There's no reason why you can't byte-compile something so that it's not interpreted. e.g.: >>> code = compile('n + 1', '', 'single') >>> code >>> def add1(n): ... exec code ... >>> add1(2) 3 >>> add1 >>> n Traceback (most recent call last): File "", line 1, in ? NameError: name 'n' is not defined >>> -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From michael.cohen at netspeed.com.au Tue Oct 3 07:45:05 2006 From: michael.cohen at netspeed.com.au (Michael Cohen) Date: Tue, 3 Oct 2006 15:45:05 +1000 Subject: [sapug] Python File Format library Message-ID: <20061003054505.GB1039@OpenWrt> Hi Guys, just published this on the wiki, thought there might be people here interested in it. Its basically a library for describing binary structures and buiding parsers from that. http://pyflag.dnsalias.org/PyFlagWiki/File_Format_Library Michael. From toojays at toojays.net Tue Oct 3 10:58:11 2006 From: toojays at toojays.net (John Steele Scott) Date: Tue, 03 Oct 2006 17:58:11 +0900 Subject: [sapug] Erlang, the movie. References: <45205DB8.3000109@iocane.com.au> Message-ID: On Mon, 02 Oct 2006 10:00:48 +0930, Daryl Tester wrote: > The second point is why I'm so keen to stick a REPL interpreter > into some of the applications I've been working on, and Python's > reference counting helps with this. Because functions and classes > are first class objects, you can do cunningness like taking a > reference to the function/class, load in the new version of module > and still be able to access the existing code. Perhaps the most extreme example of the utility of this is Erann Gat's story about using the Common Lisp REPL to debug a program on NASA's Deep Space 1. cheers, John From nepbabu.cx at gmail.com Tue Oct 3 12:14:05 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Tue, 03 Oct 2006 19:44:05 +0930 Subject: [sapug] Python File Format library In-Reply-To: <20061003054505.GB1039@OpenWrt> References: <20061003054505.GB1039@OpenWrt> Message-ID: Michael Cohen wrote: > Hi Guys, > just published this on the wiki, thought there might be people here > interested in it. Its basically a library for describing binary structures > and buiding parsers from that. > > http://pyflag.dnsalias.org/PyFlagWiki/File_Format_Library Good day Michael, atm I am learning to use many of the tools such as tcpdump, ethereal, nc and nmap myself to secure my box. Basically, my question is, what's the advantage of pyflag over them and what else can we accomplish more using pyflag other than investigating large amount of logs ? thanks for your time. -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From michael.cohen at netspeed.com.au Tue Oct 3 12:44:04 2006 From: michael.cohen at netspeed.com.au (Michael Cohen) Date: Tue, 3 Oct 2006 20:44:04 +1000 Subject: [sapug] Python File Format library In-Reply-To: References: <20061003054505.GB1039@OpenWrt> Message-ID: <20061003104404.GC1039@OpenWrt> On Tue, Oct 03, 2006 at 07:44:05PM +0930, nepBabu.cx wrote: > Good day Michael, > atm I am learning to use many of the tools such as tcpdump, ethereal, nc > and nmap myself to secure my box. > Basically, my question is, what's the advantage of pyflag over them and > what else can we accomplish more using pyflag other than investigating > large amount of logs ? nepBabu, PyFlag is a forensic utility for post incident analysis, not so much a secure your box type utility. The main page is at http://pyflag.sf.net/ which might give you more information about the pyflag tool itself. The File Format Library is a small part of the main project - because we need to read and interpret many different file types. Michael. From chris at inetd.com.au Tue Oct 3 13:05:40 2006 From: chris at inetd.com.au (Chris Foote) Date: Tue, 3 Oct 2006 20:35:40 +0930 (CST) Subject: [sapug] Erlang, the movie. In-Reply-To: References: <45205DB8.3000109@iocane.com.au> Message-ID: On Tue, 3 Oct 2006, John Steele Scott wrote: > On Mon, 02 Oct 2006 10:00:48 +0930, Daryl Tester wrote: >> The second point is why I'm so keen to stick a REPL interpreter >> into some of the applications I've been working on, and Python's >> reference counting helps with this. Because functions and classes >> are first class objects, you can do cunningness like taking a >> reference to the function/class, load in the new version of module >> and still be able to access the existing code. > > Perhaps the most extreme example of the utility of this is Erann Gat's > story about using the Common Lisp REPL to debug a program on NASA's Deep > Space 1. > > Yes, very cool: "The Remote Agent software, running on a custom port of Harlequin Common Lisp, flew aboard Deep Space 1 (DS1), the first mission of NASA's New Millennium program. Remote Agent controlled DS1 for two days in May of 1999. During that time we were able to debug and fix a race condition that had not shown up during ground testing. (Debugging a program running on a $100M piece of hardware that is 100 million miles away is an interesting experience. Having a read-eval-print loop running on the spacecraft proved invaluable in finding and fixing the problem. The story of the Remote Agent bug is an interesting one in and of itself.)" It's a shame the formal analysis[1] didn't even hint at anything beyond info that a standard core dump might provide on a static program: "The Executive???s low-level commands were used to gather a maximum of information, and then the experiment was interrupted." [1] http://ic.arc.nasa.gov/publications/pdf/2000-0176.pdf -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From chris at inetd.com.au Tue Oct 3 13:32:03 2006 From: chris at inetd.com.au (Chris Foote) Date: Tue, 3 Oct 2006 21:02:03 +0930 (CST) Subject: [sapug] Python File Format library In-Reply-To: <20061003104404.GC1039@OpenWrt> References: <20061003054505.GB1039@OpenWrt> <20061003104404.GC1039@OpenWrt> Message-ID: On Tue, 3 Oct 2006, Michael Cohen wrote: > On Tue, Oct 03, 2006 at 07:44:05PM +0930, nepBabu.cx wrote: >> Good day Michael, >> atm I am learning to use many of the tools such as tcpdump, ethereal, nc >> and nmap myself to secure my box. >> Basically, my question is, what's the advantage of pyflag over them and >> what else can we accomplish more using pyflag other than investigating >> large amount of logs ? > > nepBabu, > PyFlag is a forensic utility for post incident analysis, not so much a secure > your box type utility. The main page is at http://pyflag.sf.net/ which might > give you more information about the pyflag tool itself. > > The File Format Library is a small part of the main project - because we need > to read and interpret many different file types. Very cool! I was fortunate to attend a presentation from OSU[1] a few years ago (at Lisa 2000) and they took libpcap extraction to a new level with reassembling Quake traffic[2]: Quake-replay ??? Reads server to client traffic from a tcpdump log ??? Massages it with view direction assumed from the client to server traffic ??? Constructs a demo recording that you can play They obviously had way too much time on their hands :-) [1] interesting real-life security incident http://www3.net.ohio-state.edu/security/talks/2000/2000-12-07_incident-response_lisa/stuff_files/v3_document.htm [2] http://www3.net.ohio-state.edu/security/talks/2000/2000-12-07_incident-response_lisa/stuff-text.pdf -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From Daryl.Tester at iocane.com.au Wed Oct 4 00:06:33 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Wed, 04 Oct 2006 07:36:33 +0930 Subject: [sapug] hello everyone In-Reply-To: <4521C316.9000807@gmail.com> References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> Message-ID: <4522DEE9.4060208@iocane.com.au> nepBabu.cx wrote: > btw, this list doesn't seem to be so populated with people ? > The gaps between the posts are very intermittent ? It's a local (South Australian) list, more social than anything else, so I'm not sure how much Python you will learn from it. It also seems to be populated by weirdos with interests in languages outside of Python ... -- Regards, Daryl Tester, IOCANE Pty. Ltd. From Daryl.Tester at iocane.com.au Wed Oct 4 01:27:28 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Wed, 04 Oct 2006 08:57:28 +0930 Subject: [sapug] Erlang, the movie. In-Reply-To: References: <45205DB8.3000109@iocane.com.au> Message-ID: <4522F1E0.2070909@iocane.com.au> Chris Foote wrote: > The voice peering project I'm working on has an embedded interpreter > running in a seperate thread in 'screen' sessions (using code.interact() ) Reminding me of code.interact() brings up painful memories. :-) It's the second time where I've coded up something only to find out there was an equivalent method in the standard library (at the time of the quilter talk, my REPL was implemented using exec and eval, but I wasn't happy with it. Then I found HTTPREPL which pointed me in the appropriate direction). It annoys me, because when learning a language I make sure I go over the library in detail so I don't reinvent any unneccessary wheels. > It's a shame that it's not usable outside of reloading a module: > >>>> class C(object): > ... def method(self): > ... return '1st method version' > ... >>>> c = C() >>>> c.method() > '1st method version' >>>> >>>> def newmethod(self): > ... return '2nd method version' > ... >>>> C.method = newmethod >>>> >>>> c.method() > '2nd method version' >>>> > > i.e. existing object uses new version of method. I'd expect this, because the class that the instance refers to is being patched. Unfortunately the copy module doesn't appear to touch classes, but a possible workaround is to subclass C with the new method, then assign that to C. e.g. - >>> class C(object): ... def method(self): ... return '1st method version' ... >>> c = C() >>> c.method() '1st method version' >>> class C1(C): ... def method(self): ... return '2nd method version' ... >>> C = C1 >>> c.method() '1st method version' >>> c1 = C() >>> c1.method() '2nd method version' If a module is used there is no need to subclass the original class, as the new class is defined in what is effectively a new namespace (same name, but any existing instances hold references to the old namespace). > The Common LISP object system has a nifty way to upgrade existing objects > by invoking a 'class-changed' method.[1] CL makes my brain hurt :-( That it does (as does Richard Gabriel). -- Regards, Daryl Tester, IOCANE Pty. Ltd. From Daryl.Tester at iocane.com.au Wed Oct 4 02:21:05 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Wed, 04 Oct 2006 09:51:05 +0930 Subject: [sapug] Erlang, the movie. In-Reply-To: References: <45205DB8.3000109@iocane.com.au> Message-ID: <4522FE71.3020800@iocane.com.au> John Steele Scott wrote: > Perhaps the most extreme example of the utility of this is Erann Gat's > story about using the Common Lisp REPL to debug a program on NASA's Deep > Space 1. Heh - that's the article that inspired my dabblings. I agree with his fustrations about "non-mainstream languages" as well, even at places like Google. -- Regards, Daryl Tester, IOCANE Pty. Ltd. From nepbabu.cx at gmail.com Wed Oct 4 03:30:36 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Wed, 04 Oct 2006 11:00:36 +0930 Subject: [sapug] hello everyone In-Reply-To: <4522DEE9.4060208@iocane.com.au> References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> Message-ID: Daryl Tester wrote: > nepBabu.cx wrote: > >> btw, this list doesn't seem to be so populated with people ? >> The gaps between the posts are very intermittent ? > > It's a local (South Australian) list, more social than anything > else, so I'm not sure how much Python you will learn from it. > It also seems to be populated by weirdos with interests in > languages outside of Python ... Hi Daryl, I am in SA as well. :) It's sort of strange because I keep hearing this REPL thing, which sounded like fancy term for PERL (which is btw, the most obfuscated nonsensical language out of which we can get something done in one line) but a bit of googling helped there (read-event-print-loop if I am correct?). And then again Erlang! ha!. But it's really good that I joined atleast, learn something new in every post. :) -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From nepbabu.cx at gmail.com Wed Oct 4 03:39:16 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Wed, 04 Oct 2006 11:09:16 +0930 Subject: [sapug] Python File Format library In-Reply-To: <20061003104404.GC1039@OpenWrt> References: <20061003054505.GB1039@OpenWrt> <20061003104404.GC1039@OpenWrt> Message-ID: Michael Cohen wrote: > On Tue, Oct 03, 2006 at 07:44:05PM +0930, nepBabu.cx wrote: >> Good day Michael, >> atm I am learning to use many of the tools such as tcpdump, ethereal, nc > > nepBabu, > PyFlag is a forensic utility for post incident analysis, not so much a secure > your box type utility. The main page is at http://pyflag.sf.net/ which might ah. I'd probably never be needing pyflag, thanks for the info, I'll have a look at it soon. > give you more information about the pyflag tool itself. > > The File Format Library is a small part of the main project - because we need > to read and interpret many different file types. Any support for reading encrypted log files (ofcourse with a valid key) ? although I am assuming log files are never encrypted in production environment? > Michael. -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From chris at inetd.com.au Wed Oct 4 03:41:39 2006 From: chris at inetd.com.au (Chris Foote) Date: Wed, 4 Oct 2006 11:11:39 +0930 (CST) Subject: [sapug] hello everyone In-Reply-To: References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> Message-ID: On Wed, 4 Oct 2006, nepBabu.cx wrote: > Daryl Tester wrote: >> nepBabu.cx wrote: >> >>> btw, this list doesn't seem to be so populated with people ? >>> The gaps between the posts are very intermittent ? >> >> It's a local (South Australian) list, more social than anything >> else, so I'm not sure how much Python you will learn from it. >> It also seems to be populated by weirdos with interests in >> languages outside of Python ... > > Hi Daryl, > I am in SA as well. :) It's sort of strange because I keep hearing this > REPL thing, which sounded like fancy term for PERL (which is btw, the > most obfuscated nonsensical language out of which we can get something > done in one line) but a bit of googling helped there > (read-event-print-loop if I am correct?). almost: s/event/eval/ > And then again Erlang! ha!. > > But it's really good that I joined atleast, learn something new in every > post. :) You might also want to check out the comp.lang.python newsgroup - very high volume, but there's lots of excellent posts and high signal to noise ratio. (comp.lang.python.announce is good too to see what interesting stuff everyone's writing with Python). -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From chris at inetd.com.au Wed Oct 4 03:53:53 2006 From: chris at inetd.com.au (Chris Foote) Date: Wed, 4 Oct 2006 11:23:53 +0930 (CST) Subject: [sapug] Erlang, the movie. In-Reply-To: <4522F1E0.2070909@iocane.com.au> References: <45205DB8.3000109@iocane.com.au> <4522F1E0.2070909@iocane.com.au> Message-ID: On Wed, 4 Oct 2006, Daryl Tester wrote: > Chris Foote wrote: > >> The voice peering project I'm working on has an embedded interpreter >> running in a seperate thread in 'screen' sessions (using code.interact() ) > > Reminding me of code.interact() brings up painful memories. :-) It's the > second time where I've coded up something only to find out there was an > equivalent method in the standard library (at the time of the quilter > talk, my REPL was implemented using exec and eval, but I wasn't happy > with it. Then I found HTTPREPL which pointed me in the appropriate > direction). It annoys me, because when learning a language I make sure > I go over the library in detail so I don't reinvent any unneccessary > wheels. hehehe... It's so easy to reinvent the wheel with Python anyway, so it doesn't surprise me that everyone's written similar things :-) HTTPREPL is very cool.. I stumbled onto it a couple of months back: http://projects.amor.org/misc/wiki/HTTPREPL >> It's a shame that it's not usable outside of reloading a module: >> >>>>> class C(object): >> ... def method(self): >> ... return '1st method version' >> ... >>>>> c = C() >>>>> c.method() >> '1st method version' >>>>> >>>>> def newmethod(self): >> ... return '2nd method version' >> ... >>>>> C.method = newmethod >>>>> >>>>> c.method() >> '2nd method version' >>>>> >> >> i.e. existing object uses new version of method. > > I'd expect this, because the class that the instance refers > to is being patched. Unfortunately the copy module doesn't > appear to touch classes, but a possible workaround is to > subclass C with the new method, then assign that to C. > > e.g. - > >>>> class C(object): > ... def method(self): > ... return '1st method version' > ... >>>> c = C() >>>> c.method() > '1st method version' >>>> class C1(C): > ... def method(self): > ... return '2nd method version' > ... >>>> C = C1 >>>> c.method() > '1st method version' >>>> c1 = C() >>>> c1.method() > '2nd method version' Cool - I didn't think of that :-) > If a module is used there is no need to subclass the original > class, as the new class is defined in what is effectively a > new namespace (same name, but any existing instances hold > references to the old namespace). Very neat stuff. -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From nepbabu.cx at gmail.com Wed Oct 4 04:27:23 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Wed, 04 Oct 2006 11:57:23 +0930 Subject: [sapug] hello everyone In-Reply-To: References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> Message-ID: Chris Foote wrote: > On Wed, 4 Oct 2006, nepBabu.cx wrote: > >> Daryl Tester wrote: >>> nepBabu.cx wrote: >>> >>>> btw, this list doesn't seem to be so populated with people ? >> (read-event-print-loop if I am correct?). > > almost: s/event/eval/ ah! read-eval-print-loop. {fires firefox and points to http://en.wikipedia.org/wiki/Read-eval-print_loop to edit } > You might also want to check out the comp.lang.python newsgroup - > very high volume, but there's lots of excellent posts and high signal > to noise ratio. (comp.lang.python.announce is good too to see what > interesting stuff everyone's writing with Python). Thanks. Yeah I just joined comp.lang.python. There's too many posts from *too* many pythonists! :-) c.l.a seems a bit too much for learner like me (as does the python-devel). -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From Daryl.Tester at iocane.com.au Thu Oct 5 01:31:30 2006 From: Daryl.Tester at iocane.com.au (Daryl Tester) Date: Thu, 05 Oct 2006 09:01:30 +0930 Subject: [sapug] hello everyone In-Reply-To: References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> Message-ID: <45244452.7040509@iocane.com.au> nepBabu.cx wrote: > I am in SA as well. :) That's OK, I wasn't sure when you said you joined via gmane.org whether you were a local or not (the LinuxSA mailing list has a lot of non-local members). If you'd come in via http://mail.python.org/mailman/listinfo/sapug the "About sapug" reads: "We're a Group of Users who use Python, and we live in South Australia. I realise the name is deceptive, but there you have it." Which is also deceptive because we like to discuss other languages as well. :-) > It's sort of strange because I keep hearing this > REPL thing, which sounded like fancy term for PERL If you haven't already, read the link that John posted earlier about LISP on spacecraft, which gives a good REPL story. f you're a newcomer to languages in general, the best advice I can give as an "old timer" (NE555? *groan*) is that old languages still have something to offer, especially when their features start popping up in new langauges and are then touted as "recent inventions" (insert XML/s-expr Java/Smalltalk flamewar >here<). > But it's really good that I joined atleast, learn something new in every > post. :) Except probably this one. :-) Enjoy! -- Regards, Daryl Tester, IOCANE Pty. Ltd. From nepbabu.cx at gmail.com Thu Oct 5 14:30:45 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Thu, 05 Oct 2006 22:00:45 +0930 Subject: [sapug] hello everyone In-Reply-To: <45244452.7040509@iocane.com.au> References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> <45244452.7040509@iocane.com.au> Message-ID: Daryl Tester wrote: > nepBabu.cx wrote: > >> I am in SA as well. :) > > That's OK, I wasn't sure when you said you joined via gmane.org whether > you were a local or not (the LinuxSA mailing list has a lot of non-local > members). If you'd come in via http://mail.python.org/mailman/listinfo/sapug > the "About sapug" reads: > > "We're a Group of Users who use Python, and we live in South Australia. I > realise the name is deceptive, but there you have it." > ah! though so sapug (south australian python user group). > Which is also deceptive because we like to discuss other languages as well. :-) > I like learning every language I can. :) But I haven't dared even touching anything older/other than C(I can do few of the stuffs in it), a little bit in Smalltalk, little bit less on C++ compared to Java (which I can program the best amongst all) and finally Python is my hobby. :) >> It's sort of strange because I keep hearing this >> REPL thing, which sounded like fancy term for PERL > > If you haven't already, read the link that John posted earlier about > LISP on spacecraft, which gives a good REPL story. f you're a newcomer > to languages in general, the best advice I can give as an "old timer" > (NE555? *groan*) is that old languages still have something to offer, > especially when their features start popping up in new langauges and > are then touted as "recent inventions" (insert XML/s-expr Java/Smalltalk > flamewar >here<). > Yeah, I thought so, came across the word *objects* and *OO* in Smalltalk while reading about it but most of the stuff in Java was repeated (I thought Java was unique. But maybe it just *re-coined* objects. anyhow, I find coding in Java easier than Smalltalk (But Smalltalk (the Visual works libray) it's huge! . ~:/ >> But it's really good that I joined atleast, learn something new in every >> post. :) > > Except probably this one. :-) Enjoy! hehe.. :) > -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From nepbabu.cx at gmail.com Thu Oct 5 14:39:25 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Thu, 05 Oct 2006 22:09:25 +0930 Subject: [sapug] hello everyone In-Reply-To: References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> <45244452.7040509@iocane.com.au> Message-ID: nepBabu.cx wrote: > Daryl Tester wrote: >> nepBabu.cx wrote: >> > > I like learning every language I can. :) But I haven't dared even > touching anything older/other than C(I can do few of the stuffs in it), > a little bit in Smalltalk, little bit less on C++ compared to Java > (which I can program the best amongst all) and finally Python is my > hobby. :) > Also did couple of hundred lines (I guess) of coding in Prolog and Lisp at university. Just thought, I'd mention that. :) And Darryl cheers for your insights. -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From nepbabu.cx at gmail.com Thu Oct 5 14:48:21 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Thu, 05 Oct 2006 22:18:21 +0930 Subject: [sapug] Question regarding Python software license Message-ID: Hi list, Just a quick question I have. 1. If a person has made a software in Python, does he/she have to release the Python source as well ? 2. If the source is released, is it compulsory to allow the user of that source to make modifications and re-release the source (but ofcourse with due credits) as in GPL? Thanks. -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From nepbabu.cx at gmail.com Thu Oct 5 14:51:03 2006 From: nepbabu.cx at gmail.com (nepBabu.cx) Date: Thu, 05 Oct 2006 22:21:03 +0930 Subject: [sapug] Question regarding Python software license In-Reply-To: References: Message-ID: nepBabu.cx wrote: > Hi list, > > > 2. If the source is released, is it compulsory to allow the user of that s/user/users -- thanks, nepBabu.cx c c .-.,;(") .'`~C.-.c =W= From steve at adam.com.au Thu Oct 5 15:23:26 2006 From: steve at adam.com.au (stephen white) Date: Thu, 5 Oct 2006 22:53:26 +0930 Subject: [sapug] Question regarding Python software license In-Reply-To: References: Message-ID: <54348A44-E287-4B5F-B47A-CE31A17B9DBF@adam.com.au> On 05/10/2006, at 10:18 PM, nepBabu.cx wrote: > 1. If a person has made a software in Python, does he/she have to > release the Python source as well ? No. > 2. If the source is released, is it compulsory to allow the user of > that > source to make modifications and re-release the source (but ofcourse > with due credits) as in GPL? No... software you write with Python doesn't have to be GPL. > I like learning every language I can. :) But I haven't dared even > touching anything older/other than C(I can do few of the stuffs in > it), Nothing new since Turing and von Neumann... the buzzwords get updated every now and then. > a little bit in Smalltalk, little bit less on C++ compared to Java > (which I can program the best amongst all) and finally Python is my > hobby. :) Have you looked at Ruby? :) > I thought Java was unique. But maybe it just *re-coined* objects. There's a long history of programming languages before Java. I can't think of anything in Java which is original. That is its virtue, and its weakness. There's nothing hard about Smalltalk itself, but you're probably finding it harder since the programmers writing the code you're looking at are throwing around design patterns and other concepts that are not directly represented by the language. That means you're looking at code that is stuck together a certain way, shapes that are recognisable by eye but only if you know what you're looking at. Java (and many other languages) has been crippled so that arbitrary constructs are less possible, and more of the logic has to be directly expressed in the pre-provided language features. This is in aid of greater consistency across the code base, so that programmers can move from one area to another and still be able to read the code. The downside is that powerful language constructs are mathematical relationships arbitrarily pulled out of a grab bag by the language designer. They choose the best combination for their problems, and design a language... then hope that every other problem in the wide range of reality will also be solveable with the same tools. It's not, so every system needs a way of breaking out of the rules. There are classes of programming languages where there are very few rules, and you can build your own structures. Lisp, Smalltalk, Forth. Then there are others that emphasise approaches, making the chosen few paradigms quicker and easier. That's why Python is entirely the wrong language for Daryl, but he _likes_ that agonised squeal as he inflicts his twisted mind on innocent interpreters implementing languages specifically designed to get rid of people like Daryl. -- steve at adam.com.au From bofh at afoyi.com Thu Oct 5 17:16:00 2006 From: bofh at afoyi.com (Darryl Ross) Date: Fri, 06 Oct 2006 00:46:00 +0930 Subject: [sapug] hello everyone In-Reply-To: References: <4521744A.9070106@iocane.com.au> <4521C316.9000807@gmail.com> <4522DEE9.4060208@iocane.com.au> <45244452.7040509@iocane.com.au> Message-ID: <452521B0.7020205@afoyi.com> nepBabu.cx wrote: > And Darryl cheers for your insights. Just want to point out that I'm Darryl (with 2 R's), but Daryl (with 1 R) Tester is who you've been chatting with :) Cheers D -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 187 bytes Desc: OpenPGP digital signature Url : http://mail.python.org/pipermail/sapug/attachments/20061006/e2f2c566/attachment.pgp From chris at inetd.com.au Fri Oct 6 02:23:38 2006 From: chris at inetd.com.au (Chris Foote) Date: Fri, 6 Oct 2006 09:53:38 +0930 (CST) Subject: [sapug] Question regarding Python software license In-Reply-To: References: Message-ID: On Thu, 5 Oct 2006, nepBabu.cx wrote: > Hi list, > > Just a quick question I have. > > 1. If a person has made a software in Python, does he/she have to > release the Python source as well ? > > 2. If the source is released, is it compulsory to allow the user of that > source to make modifications and re-release the source (but ofcourse > with due credits) as in GPL? No for both - check out: http://www.python.org/psf/license/ it should answer all of your questions. There is, however, a mini-gotcha for point 1: If you're trying to sell someone proprietary software written in Python, how might you stop people from viewing your source code ? Many other implementations of languages are in a similar category. Some developers use code obfuscation techniques: http://en.wikipedia.org/wiki/Obfuscated_code Implementations that use bytecode are also subject to inspection (e.g. Java). Of course, it's nice to be able to have non-obfuscated source so that errors and backtraces from unhandled exceptions are easy to debug :-) IMHO, there are many advantages to the software buyer for gaining access to the source code, and the right to modify it for internal use. The Radiator radius server written in Perl is a good example, and very popular. -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From chris at inetd.com.au Fri Oct 6 02:32:41 2006 From: chris at inetd.com.au (Chris Foote) Date: Fri, 6 Oct 2006 10:02:41 +0930 (CST) Subject: [sapug] Question regarding Python software license In-Reply-To: <54348A44-E287-4B5F-B47A-CE31A17B9DBF@adam.com.au> References: <54348A44-E287-4B5F-B47A-CE31A17B9DBF@adam.com.au> Message-ID: On Thu, 5 Oct 2006, stephen white wrote: > Nothing new since Turing and von Neumann... the buzzwords get updated > every now and then. That's close to saying that there's nothing new in human languages since the invention of the alphabet :-) Without computer language constructs to form levels of abstraction, we'd be stuck in the days of primitive machines. IMHO, procedural and data abstraction are as least as important. -- Chris Foote Inetd Pty Ltd T/A HostExpress Web: http://www.hostexpress.com.au Blog: http://www.hostexpress.com.au/drupal/chris Phone: (08) 8410 4566 From steve at adam.com.au Fri Oct 6 09:07:47 2006 From: steve at adam.com.au (stephen white) Date: Fri, 6 Oct 2006 16:37:47 +0930 Subject: [sapug] Question regarding Python software license In-Reply-To: References: <54348A44-E287-4B5F-B47A-CE31A17B9DBF@adam.com.au> Message-ID: <0370746E-8FAC-4005-9BEA-1ADC63E784D8@adam.com.au> On 06/10/2006, at 10:02 AM, Chris Foote wrote: > IMHO, procedural and data abstraction are as least as important. That was invented back then too... I can't think of anything that exists now that wasn't invented back then in some form. Even object orientation is only a form of lambda calculus (ala Alonzo Church). The important factor is that programming languages are a crude approximation of mathematical algorithms that have exsted for hundreds of years. We exist in a ghetto of implementation while mathematicans continue thinking about ideals. I think that programming has the chance to move beyond mathematics, but it's going to take some very radical changes to how things are done. There's no incremental way out of this Turing Tar Pit. :) About the most that has been done in the last 50 years is to design new syntax to make some approaches easier, and to write lots of libraries for bugs to hide in! -- steve at adam.com.au