Page 1 of 11 | Next »
[15:26:27] volty: nmpribeiro: seems the install script of compass pretends to install where it shouldn t
[22:37:11] volty: something like this: str = IO.read ... ; str.encode!( 'UTF-8', 'ISO-8859-1', invalid: :replace ) unless str.valid_encoding? ?
[22:46:26] volty: i have a question. I forgot about closures. Need a func timeTrue(n) that when called returns true the first n times, then false
[03:17:16] volty: isn't a simple hash sufficient for the purpose of having unique-by-name instances ?
[03:36:59] volty: One has to (re)implement his classes to take into account the 'key'. No way - for me.
[03:40:00] volty: or let's say I have something complex classes and I don't want to bother thining about 'arg' in my initializers
[03:42:32] volty: take mine just as hints: e.g. class Mine; extend Multiton; end; end; mine_1 = Mine[:first] // or something like that
[03:45:00] volty: I mean define  on module (if possibile, can't remember now), or something similar, alias new, hide it, and call it from the module method that takes arg as name
[03:47:51] volty: nop, named instances are special case, and should be obtained by special means, without polluting initializers
[03:57:26] volty: sorry, forgot the limits of default singletons, but anyway for myself I do not care whether ruby's default singletons have params or not. If I was to implement this, I would go for singletons with params. and with whatever else possible
[04:04:28] volty: just one instance -- the 'different parameters' get ignored if already initialized (with initial parameters)
[04:08:45] volty: can't we reimplement Singleton.instance, aka SingletonParam < Singleton; and there allow params to be passed to aliased new ? why not
[04:14:24] volty: PorcoRex: I see the multiton as a factory. So I prefer to create those objects calling a class method (as factory)
[04:18:29] volty: writing good libraries is an art, writing abstract libraries is an abstract art :)
[04:27:48] volty: Think about a concrete case. When are you going to need multiple parameter-less instances of a class ?
[04:30:35] volty: you were talking about classes shutting an 'arg'. Are you going to subclass URL for the sole purpose of extending it with a multiton? Take a sleep, dream about it for a while, and you'll realize it's a nightmare
[04:32:49] volty: Whatever. Whatever they are, they have to be different, and to be different, you have to initialize them differently (by means of parameters of course, otherwise it gets too messy)
[04:34:15] volty: Sorry PorcoRex, but the question isn't if it is best for you. The question imho is if there's a case in the whole universe
[04:36:32] volty: Look. Apart my innate allergy to 'patterns', if left free to pattern, the patterners will pattern the 'spiting behind' too.
[04:39:20] volty: It says: Implementations - In Java, the multiton pattern can be implemented using an enumerated type.
[04:41:48] volty: I used code similar to yours to fake new & initialize on modules. But there it was interesting and useful - for the qt gui
[23:18:18] volty: we pretend to believe - too often people are not ready to argue about their narrative
[00:06:35] volty: no, I did it in old style, then, after having resolved the problems, to keep up with being "sexy" ,rewrote it in recursive manner , and threw away the "old good donky way code"
[00:08:26] volty: Verity: balance between coding and learning. Keep as much more coding than learning as you can.
[22:52:49] volty: what's best is getting the things done, and possibly with pleasure (of the beloved language)
[22:54:29] volty: as for the "what's poor for" - like questions, they should be sent back, and kindly asked to ask an advice in the style "I would like to do this, this, and this. Is Ruby nice for that? "
[23:10:18] volty: the same goes for spoken languages -- just start and breath the spirit of the language
[23:14:53] volty: and calculate too - because you need to do some calculus for the sake of choosing the fastest instructions
[23:22:02] volty: I gave it a look and escaped. I hate Python because of formatting (among others). I used to like Haskel (as a beginner), but then realized that it's utterly useless
[23:23:04] volty: imho haskell is totally useless. there's a video on yt where his creator states the same
[23:29:11] volty: yes, that is the video. As for the rest, go and try doing something in Haskell (I mean beyond folding and mapping) . A gui app, among other examples
[23:36:38] volty: no, that is only a matter of polarization oo vs functional. what oo needs isn't the REAL object of a REAL class, but just the syntactic behaviour of the oo
[23:52:18] volty: ah ah, not at all, it's presentation vs trasformation vs organization vs algorithm
[23:55:55] volty: look, I am a bit fuzy now but I try it in few words --- all those (almost all) functional purists attribute absolute value, without proving the same value. the truth is that we humans often get tired and fuzzy, and need breaks, and need to trace slowly etc etc. With recursions you can get lost. With manual tracing (stack) you can do it in the end.
[23:58:36] volty: of course you can grasp recursions on single lists and trees, but when it comes to more complex interactions between objects, you easily get lost and frustrated. Otherwise the very intelligent functionals would already have produced something with no-matched values.
[01:04:02] volty: impermanence is a double expert — expert in ruby, and expert in stupid question on ruby (and I have a good nose and good memory :) )
[01:06:23] volty: never mind, dear. I have to add that I find you useful since you force people to articulate well their knowledge on ruby
[01:10:58] volty: I don't know what you mean, matthewd. I can only repeat that I have an expert nose and excellent memory of benevolent trolls
[01:13:40] volty: (I didn't know what 'uncalled for' means; went for a dictionary - that english is not my mother lang)
[01:20:45] volty: loop enumerator could find a use in functional programming constructs, but I can't imagine a case usage now.
[01:23:35] volty: cerulean: anyway the next time you see somebody that seems a bit too noob, try to give a look at the coherency of his not-knowledge
[01:56:49] volty: Hard Way brings hard questions. How can a newbie doubt the words of the 'hard way'?
[02:01:57] volty: our expert probably meant 'redundant' - since the chars removed by chomp do not change the result ? but his instinct tells him that we should always chomp, because chomp could change the result.
[02:07:42] volty: impermanence: I wanted so say the same you are asking about — how can a novice imagine there could be "other difference"
[16:58:16] volty: I could try to answer better if you give us a simple example of what are you trying to achieve
[16:59:17] volty: if you are trying to simulate keystrokes to be consumed by other apps, you'd better go with ah-hoc external programs
[17:00:24] volty: but if you are going to consume them within your own app, you can go with qt even with no windows (but I'd have to verify this one)
[17:10:38] volty: as for the standard library I guess it isn't here just because almost no ruby coders need it
[17:15:35] volty: you can extend the os module calling external progs, or you can extend it writing your own c routines