Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Alternatives to sed + awk
- Date: Fri, 11 Mar 2011 21:58:36 +0900
- From: "Stephen J. Turnbull" <stephenjturnbull@example.com>
- Subject: Re: [tlug] Alternatives to sed + awk
- References: <AANLkTim_-D9CFYC8TNp33ni85zB+QBA7jV=BpLN=4SbZ@example.com> <4D6F8D94.9040109@example.com> <87ei6nl906.fsf@example.com> <AANLkTimk1z41fSvQQmU+7fE-1Krd_kuo3_z-1SYD5rW6@example.com> <87ipvskik1.fsf@example.com> <AANLkTi=_6DoBt+xfQVOwM6KyKrxxgA_Ec9bhp751f15y@example.com> <8762rsjkdx.fsf@example.com> <AANLkTik=tHOgTRvcvNd0qsx9-o9MuqBnWUjkWVn+0U_7@example.com> <87vczro8pk.fsf@example.com> <AANLkTi=SZg5g1q1wkDzH0axaFwj0qEeMrzz+C4JVMhSa@example.com> <87r5aeqsoj.fsf@example.com> <AANLkTimvUyFO2w5GknZnO2BXgTgBh3OjYetkoTDaaMCk@example.com>
On Fri, Mar 11, 2011 at 3:52 PM, Josh Glover <jmglov@example.com> wrote: > On 11 March 2011 03:47, Stephen J. Turnbull <stephen@example.com> wrote: > >> I like functions as first class objects a lot. > > I do as well in Python and C (heh heh); it just turns out that you > never need them in Ruby. I actually don't use functions at all in my > Ruby code. I meant to include "methods", not just bare functions. So, you don't use functions like, say, sin()? Yow! (pi/4).sin, is that it? :-) def init_foo(func,arg): def foo(): nonlocal n n = func(n) return n return foo def logistic(x) return 3.82*x*(1-x) simple_chaos = (logistic,0.5) while True: print (simple_chaos()) # Enjoy! > Everything is a class or instance method, so it doesn't > make sense to pass those around. Au contraire, it's surely makes sense to pass around a bound method (ie, a method which knows which object it's attached to); a special case of a closure. >> I find the Python convention that identifiers named with leading >> underscores are private an equally good signal in practice. > > You mean the Perl convention? ;-P Dunno. In Python it's somewhat elaborated and in CPython there's some support for identifier munging a la C++. So I don't know if it's very similar to the Perl convention or not.
- References:
- [tlug] Alternatives to sed + awk
- From: Nguyen Vu Hung
- Re: [tlug] Alternatives to sed + awk
- From: Alexander Danilov
- Re: [tlug] Alternatives to sed + awk
- From: Stephen J. Turnbull
- Re: [tlug] Alternatives to sed + awk
- From: Alexander Danilov
- Re: [tlug] Alternatives to sed + awk
- From: Stephen J. Turnbull
- Re: [tlug] Alternatives to sed + awk
- From: Josh Glover
- Re: [tlug] Alternatives to sed + awk
- From: Stephen J. Turnbull
- Re: [tlug] Alternatives to sed + awk
- From: Josh Glover
- Re: [tlug] Alternatives to sed + awk
- From: Stephen J. Turnbull
- Re: [tlug] Alternatives to sed + awk
- From: Josh Glover
- Re: [tlug] Alternatives to sed + awk
- From: Stephen J. Turnbull
- Re: [tlug] Alternatives to sed + awk
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Alternatives to sed + awk
- Next by Date: [tlug] Alternatives to sed + awk
- Previous by thread: Re: [tlug] Alternatives to sed + awk
- Next by thread: [tlug] Alternatives to sed + awk
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links