203238-411313 subjects 203526-304135
get caller of method
203448 [thomas.coopm] Does there exist a method to get the object or type of object that calls this method?
+ 203450 [work@as le m] Thomas
| + 203462 [thomas.coopm] ...
| + 203465 [erikveen@gm ] I didn't know about this b=binding trick.
| + 203468 [sean.ohalpin] It's not clear to me what you're doing with the binding. You don't
| 203952 [work@as le m] < SNIP bit that shows me up as clueless :) >
| 203960 [sean.ohalpin] Don't take it so hard - we're all still learning :)
| 203963 [pit@ca it in] And some actually enjoy it :)
| 203971 [work@as le m] Thanks for the replies people
+ 203461 [m_goldberg@a] Although others may suggest fancier techniques, I suggest a very
+ 203472 [transfire@gm] The same question was asked just a few days ago. It's generally a good
203463 [leslieviljoe] I am pretty new to metaprogramming, this is my first shot. I want to
203477 [alex@de et m] You can do the kind of thing you want using eval, but there's easier ways in Ruby.
203513 [leslieviljoe] Holy macaroni that's cool.
short cut to do a inspect method for object
203469 [junkone@ro e] I have a object with following instance variables
203500 [m.fellinger@] class A
rhtml can't find rubygems
203471 [moore.joseph] I'm having some problems including rubygems in rhtml files. I'm on OSX
203476 [anne@wj .h r] is rubygems a library? is so, giving the full unix path might solve
203641 [moore.joseph] Hmm. I have both versions, gems being installed for 1.8.4. Checking
203644 [moore.joseph] Also I have the newer ruby in /usr/bin and the older in /usr/local/lib
I'll have the duck!
203473 [transfire@gm] I promised myself I'd shut-up for awhile, maybe I still should, but I
+ 203496 [john.carter@] duck == mixin
| 203501 [m.fellinger@] Well... i don't think mixins are exactly that :)
+ 203497 [ronjeffries@] there's a language called "self" that has no classes, only prototypes. if you
| + 203498 [jake.mcarthu] I much prefer its (less mature) derivative, Io. Everything is a
| | + 203499 [znmeb@ce ma ] Actual, real programming languages with compilers or interpreters, a
| | + 203548 [schapht@gm i] You piqued my curiosity with that. But "lo" is really hard to google
| | + 203552 [rimantas@gm ] Actually it is pretty easy to google: Io programming language ;)
| | | 203556 [schapht@gm i] Right. io, not LO..... silly sans-serif fonts.
| | + 203553 [alex@bl ck e] Alex
| | + 203566 [fabioaquotte] Enjoy ;)
| + 203716 [chneukirchen] While you're at it, have a look at Slate, that also removes single-dispatch.
| 205775 [strobel@se u] if you
| + 205779 [nothinghappe] you
| + 205791 [perrin@ap th] I agree. If we were going to go that route, we'd probably want to give
| + 205843 [chneukirchen] CLOS has classes, though.
+ 203518 [robert.dober] ...
| 203523 [alex@bl ck e] That's the whole point. Duck-typing means that your class only needs to
| 203531 [robert.dober] ...
| 203532 [alex@bl ck e] It's my opinion that opposition to duck-typing is a bad idea (especially
| + 203537 [robert.dober] ...
| | 203540 [alex@bl ck e] I think it does everything you're after.
| + 203541 [dblack@wo bl] I'd go further: the definition of duck typing is that you don't :-)
| 203549 [robert.dober] ...
| 203551 [alex@bl ck e] Duck typing doesn't stop you from failing early. If you combine the
| 203561 [robert.dober] ...
| 203562 [dblack@wo bl] I don't think I'd call interface-checking "duck typing", but if it
+ 203522 [simon.kroege] Like this *evil grin* ? (Ok, there are still classes...)
+ 203528 [benjohn@fy h] sure
| 203611 [dan-ml@da 42] The concept really piqued my interest, and since ruby gives us such nice
| + 203615 [transfire@gm] [snip cool code]
| | + 203628 [dblack@wo bl] If it's a shift in paradigm, then it isn't "duck typing" (which is a
| | | 203630 [perrin@ap th] The term "duck typing" predates Ruby, as I recall. I seem to remember
| | | 203632 [dblack@wo bl] I've always thought that Dave Thomas coined it, and that it then
| | | + 203647 [perrin@ap th] You may well be right. I'm afraid I'm not an expert in the etymology of
| | | + 203664 [transfire@gm] This argument has been made before, notably by you, and it simply does
| | | | 203681 [dblack@wo bl] No misstatement: Duck typing isn't something one can implement in
| | | | + 203729 [transfire@gm] Well, besides the fact that all code is the implementation of a way of
| | | | | + 203734 [transfire@gm] Hmmm... David, my point is simply this: I understand your concern with
| | | | | + 203792 [rubyfan@gm i] Actually, David is doing something very important: he's making sure
| | | | | | + 203798 [transfire@gm] "stealing" anything. I am using teh current terminology as a jumping
| | | | | | | 203911 [hal9000@hy e] As far as I am concerned, David is smarter in his sleep than
| | | | | | | 203916 [james.britt@] I like the work Trans has done, but I'm really surprised to read such
| | | | | | | + 203919 [perrin@ap th] I'm not prepared to render judgment on Hal at the moment, but 7rans
| | | | | | | + 203920 [hal9000@hy e] You're right, of course.
| | | | | | + 203799 [ara.t.howard] on the one hand, i agree with you. on the other hand though, it's important
| | | | | | | 203813 [dblack@wo bl] Let's not get too global about this. Disagreeing about a Ruby module
| | | | | | | + 203874 [ara.t.howard] whew - because i can't even spell that! ;-)
| | | | | | | | 203928 [gregory.t.br] Zen Typing: The sound of one duck quacking.
| | | | | | | | + 203933 [Dymaio@gm il] No, really, what *is* the sound of a duck typing?
| | | | | | | | | 204227 [riko@de pa m] I suppose the very same a human does when typing. However, probably what
| | | | | | | | | 204245 [perrin@ap th] Not to the duck.
| | | | | | | | + 203935 [perrin@ap th] Shouldn't that be "the sound of one wing flapping"?
| | | | | | | | | 203942 [znmeb@ce ma ] This discussion brings back memories of the duck and the bird arguing in
| | | | | | | | | 204022 [Dymaio@gm il] I've heard that the turkey can fly. That suprised me; I would have
| | | | | | | | | 204072 [perrin@ap th] Wild turkeys can fly (badly). Domesticated, not so much. They do tend
| | | | | | | | + 203936 [ara.t.howard] touche!
| | | | | | | + 203924 [ara.t.howard] i was thinking about this on my ride home and recalled a term used in damian
| | | | | | | + 203950 [jake.mcarthu] ...
| | | | | | | | + 203955 [M.B.Smillie@] Surely AJAX already took that award?
| | | | | | | | + 204078 [hal9000@hy e] I mentioned this term in ch 1 of _The Ruby Way_ (referencing
| | | | | | | + 203983 [dblack@wo bl] It sounds like a very useful term, but maybe not a synonym for duck
| | | | | | | | 204026 [ara.t.howard] right. one would say something like
| | | | | | | | 204030 [dblack@wo bl] Don't take it too absolutely concretely on a word-by-word basis,
| | | | | | | | 204038 [ara.t.howard] __except__ for the fact that 'type' is easily one of the most semantically and
| | | | | | | | + 204060 [dblack@wo bl] I'd say "bookkeeping" is a pretty suggestive and loaded term for
| | | | | | | | | 204076 [james.britt@] If you poke around Lambda the Ultimate for a bit you soon learn that
| | | | | | | | + 204084 [hal9000@hy e] Haha... well, if you can quote Lao Tzu, I can quote
| | | | | | | | 204252 [martindemell] To which, of course, the answer is "no, it hasn't urned the right"
| | | | | | | + 204016 [Dymaio@gm il] Holy cow; the whole thread was worth it just for this. This is on
| | | | | | | 204018 [dblack@wo bl] (Do you mean 'interface polymorphism'?)
| | | | | | | 204036 [ara.t.howard] hmmm. see, i don't think these two ideas are at odds because i agree with you
| | | | | | + 203908 [hal9000@hy e] Thank you very much for that clarification, Phil.
| | | | | + 203932 [Dymaio@gm il] ... # yadda-yadda
| | | | + 203739 [Dymaio@gm il] Perhaps you should try being 'delusional,' for a change; doesn't your
| | | | + 203872 [benjohn@fy h] *nods* I tend to agree. When I posted earlier, it certainly seemed
| | | | + 203876 [benjohn@fy h] I meant to say predicate classes. Sorry.
| | | | | 203909 [dan-ml@da 42] Interesting. "predicate class" certainly sounds more serious than "duck type".
| | | | + 203877 [ara.t.howard] sortof. even if you ignore the compile-time vs run-time semantics between
| | | | + 203903 [dan-ml@da 42] Hmm, as far as I know "prototype classes" is about being able to call .new on
| | | + 203709 [dan-ml@da 42] So your objection is merely semantic? If DuckTyping isn't the "proper"
| | | + 203738 [Dymaio@gm il] It's confusing. For my part, I wouldn't mind so much seeing a module
| | | + 203749 [dblack@wo bl] The problem is that "duck typing" is already "taken" :-)
| | | + 203763 [dan-ml@da 42] *sigh*
| | | | + 203770 [transfire@gm] Yep. Now I'm wondering what they hell your're talking about ;-D
| | | | + 203786 [dblack@wo bl] I have no idea how or when or why this all got so acrimonious. For
| | | + 203769 [transfire@gm] Er... Did someone put you in charge of the duck type club? I am a
| | | 203926 [Dymaio@gm il] For the record, I'll cross-reference with Mr. Black's 2:16 PM post,
| | + 203685 [srinivas.j@s] 'interface' concept. If 'each' is a "ducktype", and 'each' has a set of
| + 203627 [dblack@wo bl] I guess you'd have to think of a new name to refer to what has in the
| + 203649 [daniel.schie] Isn't this stuff used i Aspect Oriented Programming as well? I only know
| 203678 [Dymaio@gm il] I think that AOP is a much more specific approach tailored for
+ 203679 [Dymaio@gm il] I'm not sure what the best place for this is; sorry. The following are
+ 203684 [dblack@wo bl] True, though that's partly why test-driven development is so big among
| 203865 [Dymaio@gm il] *Whew!* That's a relief.
+ 205784 [strobel@se u] No. That's not duck typing, that is shoddy programming.
205790 [perrin@ap th] I'd say that duck typing is more a means of allowing you to defer
+ 205795 [lukfugl@gm i] That is one of the most concise statements on the benefits of
| + 205801 [chiology@gm ] Duck typing appeals to me specifically because it lets me say that I
| | 205823 [perrin@ap th] Isn't that language called Io, like the natural satellite, and not IO,
| + 205824 [perrin@ap th] You're welcome -- and thanks for the compliment.
+ 206903 [strobel@se u] on
206907 [perrin@ap th] I don't think we disagree. I just said that's what I'd say -- not that
rb-gnome and gtkglext
203475 [anne@wj .h r] I ran the darwinports install instructions on rb-gnome
+ 203536 [kou@co mi ng] Thanks,
| 203585 [anne@wj .h r] Thanks for the link. what is it I should install?
+ 203658 [anne@wj .h r] apparently, one of the problem was that what I needed was rb-gnome2
+ 203662 [anne@wj .h r] running
+ 203717 [anne@wj .h r] After two days of installs, gnome then gnome2, I don't have gtk, and
| 203791 [dharple@ge e] Are you running this in an xterm started from /Applications/Utilities/
| 203899 [anne@wj .h r] I tried terminal and I tried X11 (xterm) and got the same error in
+ 203788 [mutoh@hi hw ] Can you execute other X application such as xterm ?
203906 [anne@wj .h r] I can run irb, then require "gtk2" in either terminal or xterm (X11)
203970 [kou@co mi ng] The thread says that GtkGLExt doesn't support GTK+ compiled
203972 [anne@wj .h r] case $gdktarget in x11|linux-fb|win32|quartz|directfb
203978 [anne@wj .h r] Quartz is the one of the graphics services in Mac OS X, the others are
203979 [kou@co mi ng] Yes.
204077 [anne@wj .h r] I tried that because
204086 [anne@wj .h r] oups, there is OpenGL but it is not a directory.
irb on Mac OS X not displaying previous lines
203479 [robinson.t@c] I just started using irb on my Mac. When I press the Up arrow I should
+ 203480 [curi@cu i. s] i believe you need to install readline
| 203482 [demmer12@fa ] Ruby 1.8.4 from DarwinPorts depends on readline, so it's installed
| + 203486 [robinson.t@c] Ok, I installed readline from Darwin Ports, but as you said its version
| + 203708 [hramrach@ce ] It also works for me with ruby from Fink :)
+ 203481 [demmer12@fa ] Works for me in Terminal.
+ 203529 [ryand-ruby@z] You need not do anything but build your own ruby and move the stock
203676 [robinson.t@c] Yup, that did I. I installed from Darwin Ports.
204841 [ryand-ruby@z] Not quite the same, but I suppose it works too.
How to run variable method names?
203483 [bjohnson@co ] ...
+ 203484 [sitharus@si ] In this case Ruby is interpreting method_name as the method to call.
| 203485 [dblack@wo bl] No need to call to_sym -- send will accept a string.
+ 203512 [shugotenshi@] You would use `__send__' in the event `send' is overriden.
RLisp - Lisp naturally embedded in Ruby
203488 [tomasz.wegrz] Maybe some of you guys will be interested.
+ 203492 [john.carter@] This is just very very Cool.
| 203493 [john.carter@] - Or perhaps hack on it until it outputs Joy instead of Lisp.
+ 203618 [erikveen@gm ] Great!
+ 203624 [w_a_x_man@ya] Very interesting.
| 203639 [tomasz.wegrz] Now I know perfectly well that let is used in different way in other
| + 203653 [w_a_x_man@ya] In newLisp, (setq x 9) is equivalent to
| | 203682 [tomasz.wegrz] I have to say that I come more from Objective Caml/Ruby than
| | 203695 [ola.bini@ki ] Why don't you do an OCaml in Ruby instead, if you don't know the
| + 203721 [chneukirchen] BTW, compare with Basic's LET. }}}:-)
| 203727 [tomasz.wegrz] Is setf used like that in any Lisp ?
| + 203731 [ola.bini@ki ] Which standard?
| | + 203736 [tomasz.wegrz] Revised 5 Report on the Algorithmic Language Scheme.
| | | 203741 [ola.bini@ki ] Actually, the reason people never say "we often want to do X, this is
| | + 203808 [perrin@ap th] More to the point, it seems to me that an opinion about something
| | 203840 [ola.bini@ki ] This was another point I tried to get across, but your statement
| + 203803 [chneukirchen] Does Common Lisp count? :)
| | + 203818 [tomasz.wegrz] Yeah, but setf changes variables in outside scope.
| | | 204258 [chneukirchen] (defun foo ()
| | | 204259 [tomasz.wegrz] Can we macro around it or something, so that
| | | + 204261 [ola.bini@ki ] Such a macro would be a strange beast indeed. The problem is that
| | | + 204319 [martin@sn wp] Well, you can't quite do that but you can easily do something like
| | | 204330 [tomasz.wegrz] So, how would such a macro look like ?
| | | + 204339 [ola.bini@ki ] You would have to do a code-walker (with all the glory such a thing
| | | + 204356 [martin@sn wp] Well, 1) This is ruby-talk, not comp.lang.lisp, and 2) I don't
| | | 204360 [tomasz.wegrz] Wow, I'm genuinely impressed by this macro.
| | + 203839 [ola.bini@ki ] Heh, you seem to misread the question. The question referred to an
| + 203893 [curi@cu i. s] Umm, where does he say that?
+ 203900 [tomasz.wegrz] New version of RLisp is available. Now with lexical scoping,
204145 [wrecklass1@g] 1) I have really liked Ruby for the very reason that I can often
+ 204147 [tomasz.wegrz] I agree that Ruby syntax is usually nicer.
+ 204150 [perrin@ap th] While you may not want "rules lawyers" and "min-maxers" in your RPG
Re: Mongoose 0.2.0
203491 [vikkous@gm i] Ok, this is a totally different sort of query language, but have you
Bother checking wether got response from others of your topic?
203494 [windylady121] I know you must have such headache as I had. But now, aha, I found
checking for directory (noob mistake?)
203503 [bilal33@gm i] I apologize in advance if this is a stupid question, but this is the
+ 203505 [dharple@ge e] directories in the specified path, it does not return the path to
+ 203506 [foamdino@gm ] I'm not sure, but works fine on my machine (OSX)
203509 [botp@de mo t] # I'm not sure, but works fine on my machine (OSX)
203510 [raffir@gm il] I have a find() query inside a for loop. Basically, I want the loop to
+ 203515 [robert.dober] ...
+ 203525 [jan.svitok@g] Try to fiddle with the condition... what are your course numbers like?
+ 203533 [has.sox@gm i] ...
[Nitro] [ANN] Nitro/Og 0.31.0
203514 [surrender_it] (forwarding from nitro's list)
203907 [Eric.Armstro] a sentence or two telling me what nitro is, I'd
Shared memory between servers.
203516 [pedro.baldan] I was thinking about this question all weekend. It's possible to have
+ 203519 [farrel.lifso] It's in in the standard lib.
+ 203527 [eyal.oren@de] check memcached , a cache shared over multiple servers; it can be used
+ 203573 [ara.t.howard] you want a tuplespace. it's part of drb, which ships with ruby.