From george.moschovitis at gmail.com Wed May 2 16:39:47 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 2 May 2007 23:39:47 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: Message-ID: I applied the patch (along with the others) and indeed it speeds up Og's startup time. thanks, -g. On 4/29/07, Jonathan Buch wrote: > > Hi, > > as promised, the speed patch. > > Sun Apr 29 10:40:53 EEST 2007 Jonathan Buch > * Startup speed patch, removes many unnecessary calls to ann() > See thread: > http://rubyforge.org/pipermail/nitro-general/2007-April/007605.html > > > 2 Buffixes > > Sun Apr 29 10:50:49 EEST 2007 Jonathan Buch > * small fix in refers_to, wasn't saving self correctly. > > Sun Apr 29 10:59:56 EEST 2007 Jonathan Buch > * bugfix, integer oids werent saved correctly anymore > > > And more features. > You can stay away from those for the moment. Anyone who wants to > try them though, just go ahaid, they work well but should be > tested. > > > Sun Apr 29 10:19:07 EEST 2007 Jonathan Buch > * small glue format validation fix > This removes the nil checking from validate_format, should use > validate_value for that. Also don't use .source on the regex. > > Sun Apr 29 10:25:57 EEST 2007 Jonathan Buch > * Og StringArrays for psql + DateTime as timestamp with timezone > > Sun Apr 29 10:49:55 EEST 2007 Jonathan Buch > * Add optional options to joins_many .count > > Sun Apr 29 10:52:40 EEST 2007 Jonathan Buch > * Add refers_many, uses psql arrays to make a hybrid refers_to/has_many > This saves the foreign keys in a psql StringArray. Using this you can > avoid creating more join tables. Current restriction: it only works > for string keys, so only use it with uuids or custom ones. > > Sun Apr 29 10:57:43 EEST 2007 Jonathan Buch > * Add preliminary detection of join table classes > > Sun Apr 29 11:01:00 EEST 2007 Jonathan Buch > * Enable custom aggregation queries > This patches allows the overriding of the :select option, this is also > needed for the refers_many relation. > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070502/b723b9ce/attachment.html From john at oxyliquit.de Thu May 3 16:59:23 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 03 May 2007 23:59:23 +0300 Subject: [Nitro] Facets Annotations, Og startup speed In-Reply-To: References: <1177473694.614076.186240@r3g2000prh.googlegroups.com> Message-ID: Hi, Trans, Ping. Have you seen this? > One change I made to ann_attr.rb in facets: > > 86: ann(a,harg) if !harg.empty? > > bacause I cought attr_accessor call ann() with no hash arguments. > > Is this change valid, and if it is, could this go into the next facets? Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Thu May 3 16:59:23 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 03 May 2007 23:59:23 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: Message-ID: Hi, > I applied the patch (along with the others) and indeed it speeds up Og's > startup time. did you doubt me? ;) There's one spot left, which I avoided for now (.define_force_methods), where I'm just not sure what it actually does. I shut it off for me here, and it had no effect at all. Someone else might be using it though? Anyway, how's your free time after wedding, ready to rumble again? :P Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Fri May 4 01:14:55 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 May 2007 08:14:55 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: Message-ID: > > There's one spot left, which I avoided for now (.define_force_methods), yeah, this is something i plan to remove at some time. Anyway, how's your free time after wedding, ready to rumble again? :P I will get back in Greece this monday ;-) -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070504/648d57a4/attachment.html From john at oxyliquit.de Fri May 4 07:37:56 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 04 May 2007 14:37:56 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: Message-ID: Hi, > I applied the patch (along with the others) and indeed it speeds up Og's > startup time. as a quick sidenote: For that last ounce of speed, do the following: Og.manager_options.update( :classes => [All, Your, OgClasses] ) This not only skips the ObjectSpace search, but also skips all of the expensive .serializeable_attributes calls to determine if the classes are 'useable' for Og. So, use with care, and only when the layout is 'stable'. Enjoy everyone, Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From rob at robmela.com Fri May 4 10:59:23 2007 From: rob at robmela.com (Robert Mela) Date: Fri, 04 May 2007 10:59:23 -0400 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: Message-ID: <463B4A4B.9020602@robmela.com> As an aside... this is not so much Nitro, but a common theme in dynamic language frameworks... The dynamic stuff is a necessary but double-edged sword. It's the lever that gives Nitro its force. But the dynamically constructed application doesn't seem straightforward to debug. At a certain level the stack trace dumps are hard to correlate back to any particular code as loaded from disk. Would it be possible to use more of the annotation information, or add more annotation information, to provide better stack traces, or a switch that injects optional local variables with state information when running in debug mode? I realize this is more of a ruby question than a Nitro question, and may be more indicative of my ignorance than any language or Nitro limitation. If so, I'm sorry for the interruption... But if this is a valid point, then... since ease of use includes ease of debugging, then I think improved stack trace information will speed Nitro's rate of uptake and adoption. I see it as an enhancement for 0.60 or 0.70 ;) Jonathan Buch wrote: > Hi, > > >> I applied the patch (along with the others) and indeed it speeds up Og's >> startup time. >> > > as a quick sidenote: > > For that last ounce of speed, do the following: > > Og.manager_options.update( > :classes => [All, Your, OgClasses] > ) > > This not only skips the ObjectSpace search, but also skips all of the > expensive .serializeable_attributes calls to determine if the classes > are 'useable' for Og. So, use with care, and only when the layout is > 'stable'. > > Enjoy everyone, > > Jo > > -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070504/a4cd1e39/attachment-0001.vcf From john at oxyliquit.de Mon May 7 05:07:32 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 07 May 2007 12:07:32 +0300 Subject: [Nitro] Error Reporting WAS: Re: [PATCH] Og patches In-Reply-To: <463B4A4B.9020602@robmela.com> References: <463B4A4B.9020602@robmela.com> Message-ID: Hi, > As an aside... this is not so much Nitro, but a common theme in dynamic > language frameworks... this is slightly ot, but nontheless a very good discussion. :) > The dynamic stuff is a necessary but double-edged sword. It's the > lever that gives Nitro its force. But the dynamically constructed > application doesn't seem straightforward to debug. At a certain level > the stack trace dumps are hard to correlate back to any particular code > as loaded from disk. Yeah, this is most true, especially at 2 areas: Og relations and Nitro templates. Good error reporting is one of the hardest things to do in a framework. > Would it be possible to use more of the annotation information, or add > more annotation information, to provide better stack traces, or a > switch that injects optional local variables with state information when > running in debug mode? Well, there's a few points where it's just impossible to get 'more info'. One of that is using eval(). Hm... speaking of that, file and line can be given to the eval functions, have to check that. Ahh.. yeah, well, expect next release to have at least better stack traces when something in the Og relations goes bad. :) But, preferably, stack traces should always point to your own code, not to Nitro/Og. ;D Code digging isn't everyones favourite hobby, and having to dig into a whole framework might scare people off a little. So, what would be best, more checks everywhere + custom error classes? > I realize this is more of a ruby question than a Nitro question, and may > be more indicative of my ignorance than any language or Nitro > limitation. If so, I'm sorry for the interruption... The Nitro ML is so low volume, don't hesitate to write. ;) And your post pointed some things out which could be made better in Nitro, which is always a good thing. And, any mail to Nitro ML is a motivation 'refreshment' for me to work on Nitro/Og. :) > But if this is a valid point, then... since ease of use includes ease of > debugging, then I think improved stack trace information will speed > Nitro's rate of uptake and adoption. I see it as an enhancement for > 0.60 or 0.70 ;) I'll make a patch ready for Og in the next days, that at least will go into the next release. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From nyarly at gmail.com Mon May 7 15:30:16 2007 From: nyarly at gmail.com (Judson Lester) Date: Mon, 7 May 2007 12:30:16 -0700 Subject: [Nitro] Not dead! With bundle! Message-ID: <8905c87a0705071230ud7594a9m1714d1a73636c287@mail.gmail.com> Hey all, I'm not dead, just absorbed in other projects for a little while. Anyway, so in the course of adapting the mysql -> psql migrater example to migrate an actual project from Sqlite to MySQL, I discovered that there's an odd bug in generating the SQL types for Ruby classes when creating tables. To be honest, it's not a terribly frequent behavior. So, attached is a fix involving using the default value blocks for Hashes on @typemap. One of the projects I'm working on is perhaps more ambitious than is really realistic, but I've got high hopes: I'm trying to develop a development utility to create specification starting points from existing code. Nitro (especially Og) seems like an ideal patient once I get it off the ground. Judson -- Q: How does a hacker escape handcuffs? A: Backslashes. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070507/4f1aa3c5/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: cascading-typemap.bdnl Type: application/octet-stream Size: 40427 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070507/4f1aa3c5/attachment-0001.obj From nyarly at gmail.com Mon May 7 15:34:47 2007 From: nyarly at gmail.com (Judson Lester) Date: Mon, 7 May 2007 12:34:47 -0700 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: Message-ID: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> On 5/4/07, Jonathan Buch wrote: > For that last ounce of speed, do the following: > > Og.manager_options.update( > :classes => [All, Your, OgClasses] > ) Is it worth emitting a warning or something with the current detected version of that line? So, if you perform some version of "Og.manager.manage_classes()" it emits a warning like: INFO: for more speed, consider "Og.manager_options.update(:classes => [Some, More, OgClasses])" -- Q: How does a hacker escape handcuffs? A: Backslashes. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070507/178e226e/attachment.html From john at oxyliquit.de Tue May 8 06:33:59 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 08 May 2007 13:33:59 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> Message-ID: Hi, > Is it worth emitting a warning or something with the current detected > version of that line? > > So, if you perform some version of "Og.manager.manage_classes()" it > emits a warning like: > > INFO: for more speed, consider "Og.manager_options.update(:classes => > [Some, More, OgClasses])" no, this is a good idea but I think it should remain a 'optimization', as it can cause very misleading error messages and backtraces. When you forget a single class, things break havoc. A newbie might think 'oooh, speed, good, let's use it', but doesn't consider the 'side effects'. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Tue May 8 06:35:34 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 08 May 2007 13:35:34 +0300 Subject: [Nitro] Not dead! With bundle! In-Reply-To: <8905c87a0705071230ud7594a9m1714d1a73636c287@mail.gmail.com> References: <8905c87a0705071230ud7594a9m1714d1a73636c287@mail.gmail.com> Message-ID: Hi, just short note, thanks for that patch! This is one step forward in the quest of 'fail early' and better error reporting in Og. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Tue May 8 07:01:17 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 8 May 2007 14:01:17 +0300 Subject: [Nitro] Not dead! With bundle! In-Reply-To: <8905c87a0705071230ud7594a9m1714d1a73636c287@mail.gmail.com> References: <8905c87a0705071230ud7594a9m1714d1a73636c287@mail.gmail.com> Message-ID: thanks for the patch ;-) -g. PS: I am back as well... On 5/7/07, Judson Lester wrote: > > Hey all, > > I'm not dead, just absorbed in other projects for a little while. > > Anyway, so in the course of adapting the mysql -> psql migrater example to > migrate an actual project from Sqlite to MySQL, I discovered that there's an > odd bug in generating the SQL types for Ruby classes when creating tables. > To be honest, it's not a terribly frequent behavior. So, attached is a fix > involving using the default value blocks for Hashes on @typemap. > > One of the projects I'm working on is perhaps more ambitious than is > really realistic, but I've got high hopes: I'm trying to develop a > development utility to create specification starting points from existing > code. Nitro (especially Og) seems like an ideal patient once I get it off > the ground. > > Judson > -- > Q: How does a hacker escape handcuffs? > A: Backslashes. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070508/ceb8d16a/attachment.html From nyarly at gmail.com Tue May 8 16:49:30 2007 From: nyarly at gmail.com (Judson Lester) Date: Tue, 8 May 2007 13:49:30 -0700 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> Message-ID: <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> On some level, though, I'd like to see some reminder of the step, because I know I'll forget in 6 months when I take my next Og project to production. A link to an article that discusses all the pitfalls, maybe? More ambitiously, catch the errors caused by a missing class management and reference the same article? Judson On 5/8/07, Jonathan Buch wrote: > > Hi, > > > Is it worth emitting a warning or something with the current detected > > version of that line? > > > > So, if you perform some version of "Og.manager.manage_classes()" it > > emits a warning like: > > > > INFO: for more speed, consider "Og.manager_options.update(:classes => > > [Some, More, OgClasses])" > > no, this is a good idea but I think it should remain a 'optimization', > as it can cause very misleading error messages and backtraces. > When you forget a single class, things break havoc. A newbie might > think 'oooh, speed, good, let's use it', but doesn't consider the > 'side effects'. > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Q: How does a hacker escape handcuffs? A: Backslashes. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070508/7860985c/attachment.html From john at oxyliquit.de Wed May 9 03:33:22 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 09 May 2007 10:33:22 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> Message-ID: Hi, > On some level, though, I'd like to see some reminder of the step, > because I know I'll forget in 6 months when I take my next Og project > to production. > > A link to an article that discusses all the pitfalls, maybe? > > More ambitiously, catch the errors caused by a missing class management > and reference the same article? How about a general Tip "How to speed up Og" on oxywtf? I'd be willing to write that if you want me to. What I hope is, that you still remember oxyliquit after 6 months. ;) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Thu May 10 04:23:40 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 10 May 2007 11:23:40 +0300 Subject: [Nitro] New nitro powered site Message-ID: Dear devs, I have already announced this to the irc channel but I would like to announce this to the mailing list as well: Please surf to: www.joyerz.com a nitro-powered site featuring photos of beautiful people. Keep in mind that the site is under construction and not officially launched, but still, I would like to hear comments and suggestions from you. have fun, -g. PS: check back daily for great new photos... -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070510/c3fbf3ba/attachment.html From noe.rubinstein at gmail.com Thu May 10 14:39:33 2007 From: noe.rubinstein at gmail.com (=?UTF-8?Q?No=C3=A9_Rubinstein?=) Date: Thu, 10 May 2007 20:39:33 +0200 Subject: [Nitro] New nitro powered site In-Reply-To: References: Message-ID: This site looks groovy, but it freezes my browser 15 seconds for each page loading. Too much Javascript kills users ! (I've got the same problem with np.org) 2007/5/10, George Moschovitis : > Dear devs, > > I have already announced this to the irc channel but I would like to > announce this to the mailing list as well: > > Please surf to: > > www.joyerz.com > > a nitro-powered site featuring photos of beautiful people. Keep in mind that > the site is under construction and not officially launched, but still, I > would like to hear comments and suggestions from you. > > > have fun, > -g. > > > PS: check back daily for great new photos... > > -- > http://georgeandstella.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From john at oxyliquit.de Thu May 10 15:04:23 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 10 May 2007 22:04:23 +0300 Subject: [Nitro] New nitro powered site In-Reply-To: References: Message-ID: Heya, bugreport, the picture 'gmosx' down right links to the wrong page (http://www.joyerz.com/view/www.gmosx.com), and, could you reduce the google ads from 3 to 2? 3 is slightly over the top I think. ;) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Fri May 11 04:25:30 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 May 2007 11:25:30 +0300 Subject: [Nitro] New nitro powered site In-Reply-To: References: Message-ID: Ok, I will have a look at these issues... thanks. -g. On 5/10/07, Jonathan Buch wrote: > > Heya, > > bugreport, the picture 'gmosx' down right links to the wrong > page (http://www.joyerz.com/view/www.gmosx.com), and, could > you reduce the google ads from 3 to 2? 3 is slightly over the > top I think. ;) > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070511/8823d009/attachment-0001.html From george.moschovitis at gmail.com Fri May 11 04:29:28 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 May 2007 11:29:28 +0300 Subject: [Nitro] joy/cull banners Message-ID: Niko, entaksy me tis diastaseis twn banners? an exeis kapoio problhma pes mou. -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070511/09144c38/attachment.html From john at oxyliquit.de Fri May 11 14:14:11 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 11 May 2007 21:14:11 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> Message-ID: Hi, sometimes I wonder if my mails reach the ML, this is one of those times... did it go through? I was saying that maybe you'd like me to make a post on Oxyliquit if you want me to, and that I had hoped you still remember that site after 6 months. ^^; But I don't think that speed-optimization-notifications should be put out by Og directly... Jo From nyarly at gmail.com Fri May 11 19:21:51 2007 From: nyarly at gmail.com (Judson Lester) Date: Fri, 11 May 2007 16:21:51 -0700 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> Message-ID: <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> On 5/11/07, Jonathan Buch wrote: > But I don't think that speed-optimization-notifications should > be put out by Og directly... And in my little ideal world, there'd be some notifications. Or something. Even links to articles, or a pointer to the README that talks about the optimizations, because the closer the answer is to the question, the more people will have a good experience, you know? I think I'm alone in that view though, so I was keeping mum. -- Q: How does a hacker escape handcuffs? A: Backslashes. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070511/d0b867cb/attachment.html From john at oxyliquit.de Sat May 12 05:17:34 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 12 May 2007 12:17:34 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> Message-ID: Hi, >> But I don't think that speed-optimization-notifications should >> be put out by Og directly... > > And in my little ideal world, there'd be some notifications. Or something. > Even links to articles, or a pointer to the README that talks about the > optimizations, because the closer the answer is to the question, the more > people will have a good experience, you know? so, where is the question located then? The question arises, if you have more than a dozen Models, and the startup time goes over 20 seconds, that would be my guess where people start to ask 'could this go faster'. The most important setting (which brings the most speed) is: `Og.create_schema = false`, not the :classes option. :classes is a very small enhancement of only 1 ObjectSpace search + (around 5 calls to ann() less per Model). So, the question is, how 'big' should the advertisement of this option be and where would we put it? (Og.create_schema) I have used this option for as long as I know Og now, so I'm not sure how visible it is. Do you think it needs more exposure? On the other hand, I'm just not sure if we should create a Office 'paper- clip' behaviour, always nagging at startup. > I think I'm alone in that view though, so I was keeping mum. I'm not so sure about that, anyone else care to jump in? George, any comment on this? Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From rob at robmela.com Sat May 12 08:53:53 2007 From: rob at robmela.com (Robert Mela) Date: Sat, 12 May 2007 08:53:53 -0400 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> Message-ID: <4645B8E1.1020300@robmela.com> I think that anyone who has more than a dozen models is someone who has spent some time with Nitro and already consulted some documentation. Such people are likely to be familiar with software development and documentation, and are likely to start looking for the word "performance" in a documentation directory. In fact, there could be a file called 'performance.html' in the docs directory. Jonathan Buch wrote: > Hi, > > >>> But I don't think that speed-optimization-notifications should >>> be put out by Og directly... >>> >> And in my little ideal world, there'd be some notifications. Or something. >> Even links to articles, or a pointer to the README that talks about the >> optimizations, because the closer the answer is to the question, the more >> people will have a good experience, you know? >> > > so, where is the question located then? The question arises, if you have > more than a dozen Models, and the startup time goes over 20 seconds, that > would be my guess where people start to ask 'could this go faster'. The > most important setting (which brings the most speed) is: > `Og.create_schema = false`, not the :classes option. :classes is a very > small enhancement of only 1 ObjectSpace search + (around 5 calls to ann() > less per Model). > > So, the question is, how 'big' should the advertisement of this option be > and where would we put it? (Og.create_schema) > I have used this option for as long as I know Og now, so I'm not sure how > visible it is. Do you think it needs more exposure? > On the other hand, I'm just not sure if we should create a Office 'paper- > clip' behaviour, always nagging at startup. > > >> I think I'm alone in that view though, so I was keeping mum. >> > > I'm not so sure about that, anyone else care to jump in? George, any > comment on this? > > Jo > > -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070512/d2b23177/attachment.vcf From john at oxyliquit.de Sun May 13 11:05:28 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 13 May 2007 18:05:28 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: <4645B8E1.1020300@robmela.com> References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> <4645B8E1.1020300@robmela.com> Message-ID: Hi, > I think that anyone who has more than a dozen models is someone who has > spent some time with Nitro and already consulted some documentation. not necessarily true, I myself have never once looked in the Og doc dir nor have tried or even looked at a single example. ;) > Such people are likely to be familiar with software development and > documentation, and are likely to start looking for the word > "performance" in a documentation directory. > > In fact, there could be a file called 'performance.html' in the docs > directory. Well, lets figure someone, who's evaluating Og for use with a slightly bigger project. He creates the general model layout, starts it for the first time and it takes 20 seconds to start up. I agree with Lester that this might not be the 'first expression' we want to create. What about this idea: Creating a general startup/shutdown callback (just some array with procs in it). This could then be used to provide a 'helper' which just collects the start time, if it goes over 15 seconds it prints a debug message saying 'quite a long startup, consider ' This message could be enabled on default, more experienced users can just disable it by modifying the startup-callback array. Anyway, George, you hearin' this? You oughta be back in business right now, or are you dead busy converting to rspecs. :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sun May 13 14:21:52 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 13 May 2007 21:21:52 +0300 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> <4645B8E1.1020300@robmela.com> Message-ID: I am busy with something at the moment. Will jump in to this thread tomorow morning. -g. On 5/13/07, Jonathan Buch wrote: > > Hi, > > > I think that anyone who has more than a dozen models is someone who has > > spent some time with Nitro and already consulted some documentation. > > not necessarily true, I myself have never once looked in the Og doc dir > nor have tried or even looked at a single example. ;) > > > Such people are likely to be familiar with software development and > > documentation, and are likely to start looking for the word > > "performance" in a documentation directory. > > > > In fact, there could be a file called 'performance.html' in the docs > > directory. > > Well, lets figure someone, who's evaluating Og for use with a slightly > bigger project. He creates the general model layout, starts it for the > first time and it takes 20 seconds to start up. > I agree with Lester that this might not be the 'first expression' we > want to create. > > What about this idea: > > Creating a general startup/shutdown callback (just some array with > procs in it). This could then be used to provide a 'helper' which > just collects the start time, if it goes over 15 seconds it prints > a debug message saying 'quite a long startup, consider ' > > This message could be enabled on default, more experienced users > can just disable it by modifying the startup-callback array. > > Anyway, George, you hearin' this? You oughta be back in business > right now, or are you dead busy converting to rspecs. :P > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070513/f446b0b3/attachment.html From george.moschovitis at gmail.com Mon May 14 20:05:02 2007 From: george.moschovitis at gmail.com (george.moschovitis at gmail.com) Date: Tue, 15 May 2007 00:05:02 +0000 (UTC) Subject: [Nitro] =?utf-8?q?=5BNP=2EORG=5D_Nitro/Og_Fora_daily_digest?= Message-ID: <20070515000502.49DA08704@reizu.com> >From gmosx.myopenid.com Date: Mon May 14 06:20:25 UTC 2007 Subject: Extract main part of domain Message-ID: http://www.nitroproject.org/fora/posts/view/a0hNacaEmr3kiUeJeZaaqU < nitro.com localhost:8000 ->< localhost:8000 gmosx.nitro.com -> nitro.com If someone can provide an elegant snippet of code, I would like to see this. -g. -- This mail is automatically generated from the http://nitroproject.org/fora digest robot. It presents the discussions in the fora during the last 24 hours. Do not reply to this email. From rob at robmela.com Mon May 14 21:34:06 2007 From: rob at robmela.com (Robert Mela) Date: Mon, 14 May 2007 21:34:06 -0400 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <20070515000502.49DA08704@reizu.com> References: <20070515000502.49DA08704@reizu.com> Message-ID: <46490E0E.8010004@robmela.com> This is slow but probably correct. I'm not sure it qualifies as elegant. Anything else would probably require encoding some information about valid domain naming, and would fail on any unusual, organization-internal domain naming. robert-melas-ibook-g4:~/robmela.com robertmela$ vim foo.cpp def domain_base(str) domain = nil str.split(/\./).reverse.each do |part| begin domain = domain ? [ part, domain ].join('.') : part return Socket::gethostbyname( domain )[0] rescue end end return nil end puts domain_base('www.cnet.co.uk') puts domain_base('gmosx.nitro.com') puts domain_base('ci.lexington.ma.us') puts domain_base('localhost') puts domain_base('voozzlbp.szligscky.vrzovnobitz') ~ Output: cnet.co.uk nitro.com ci.lexington.ma.us localhost nil george.moschovitis at gmail.com wrote: > >From gmosx.myopenid.com > Date: Mon May 14 06:20:25 UTC 2007 > Subject: Extract main part of domain > Message-ID: http://www.nitroproject.org/fora/posts/view/a0hNacaEmr3kiUeJeZaaqU > > > I am wondering if anyone has an elegant solution to this problem: I want to extact the 'main' part of a domain, for example: > > www.nitro.com ->< nitro.com > localhost:8000 ->< localhost:8000 > gmosx.nitro.com -> nitro.com > > If someone can provide an elegant snippet of code, I would like to see this. > > -g. > > > > > -- > This mail is automatically generated from the http://nitroproject.org/fora > digest robot. It presents the discussions in the fora during the last 24 hours. > Do not reply to this email. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070514/55e07080/attachment-0001.vcf From wyhaines at gmail.com Tue May 15 10:14:20 2007 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 15 May 2007 07:14:20 -0700 Subject: [Nitro] Nitro support for Swiftiply Message-ID: I am wondering what the best approach is for Swiftiply to offer support for Nitro? Swiftiply is packed with a couple hotpatches to Mongrel which, when required, provide either a Mongrel that runs in an evented mode instead of a threaded mode, or a Mongrel that runs as a full Swiftiply client. These are swiftcore/evented_mongrel.rb and swiftcore/swiftiplied_mongrel.rb. With Merb, Ezra Z. just builtin the following: if ENV['SWIFT'] require 'swiftcore/swiftiplied_mongrel' elsif ENV['EVENT'] require 'swiftcore/evented_mongrel' else require 'mongrel' end He also provided a mongrel_rails script that does the same thing. At the simplest, someone could just require evented_mongrel or swiftiplied_mongrel in their code, and it should work. The only concern there has to do with the --cluster option. When running with swiftiply, multiple processes should all be started on the _same_ port, since swiftiplied_mongrel transparently turns mongrel into a client of Swiftiply. So, what is the best way for me to support Nitro? Kirk Haines From george.moschovitis at gmail.com Tue May 15 12:11:57 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 15 May 2007 19:11:57 +0300 Subject: [Nitro] Nitro support for Swiftiply In-Reply-To: References: Message-ID: Hello Kirk, please excuse my ignorance, but what exactly is Switftiply? ;-) -g. On 5/15/07, Kirk Haines wrote: > > I am wondering what the best approach is for Swiftiply to offer > support for Nitro? > > Swiftiply is packed with a couple hotpatches to Mongrel which, when > required, provide either a Mongrel that runs in an evented mode > instead of a threaded mode, or a Mongrel that runs as a full Swiftiply > client. > > These are swiftcore/evented_mongrel.rb and > swiftcore/swiftiplied_mongrel.rb. > > With Merb, Ezra Z. just builtin the following: > > if ENV['SWIFT'] > require 'swiftcore/swiftiplied_mongrel' > elsif ENV['EVENT'] > require 'swiftcore/evented_mongrel' > else > require 'mongrel' > end > > He also provided a mongrel_rails script that does the same thing. > > At the simplest, someone could just require evented_mongrel or > swiftiplied_mongrel in their code, and it should work. The only > concern there has to do with the --cluster option. When running with > swiftiply, multiple processes should all be started on the _same_ > port, since swiftiplied_mongrel transparently turns mongrel into a > client of Swiftiply. > > So, what is the best way for me to support Nitro? > > > Kirk Haines > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070515/66aa1d5f/attachment.html From wyhaines at gmail.com Tue May 15 12:20:44 2007 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 15 May 2007 09:20:44 -0700 Subject: [Nitro] Nitro support for Swiftiply In-Reply-To: References: Message-ID: On 5/15/07, George Moschovitis wrote: > Hello Kirk, > > please excuse my ignorance, but what exactly is Switftiply? ;-) http://swiftiply.swiftcore.org Basically, it is a fast clustering proxy for web apps that also includes a path for mongrel that makes Mongrel run in an evented architecture instead of a threaded architecture. Kirk From transfire at gmail.com Tue May 15 14:40:15 2007 From: transfire at gmail.com (transfire at gmail.com) Date: Tue, 15 May 2007 18:40:15 -0000 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <20070515000502.49DA08704@reizu.com> References: <20070515000502.49DA08704@reizu.com> Message-ID: <1179254415.346554.174630@h2g2000hsg.googlegroups.com> On May 14, 8:05 pm, george.moschovi... at gmail.com wrote: > >From gmosx.myopenid.com > > Date: Mon May 14 06:20:25 UTC 2007 > Subject: Extract main part of domain > Message-ID:http://www.nitroproject.org/fora/posts/view/a0hNacaEmr3kiUeJeZaaqU > > > I am wondering if anyone has an elegant solution to this problem: I want to extact the 'main' part of a domain, for example: > > www.nitro.com->< nitro.com > localhost:8000 ->< localhost:8000 > gmosx.nitro.com -> nitro.com > > If someone can provide an elegant snippet of code, I would like to see this. http://www.ruby-doc.org/stdlib/libdoc/uri/rdoc/index.html T. From rob at robmela.com Tue May 15 21:49:31 2007 From: rob at robmela.com (Robert Mela) Date: Tue, 15 May 2007 21:49:31 -0400 Subject: [Nitro] [PATCH] Og patches In-Reply-To: References: <8905c87a0705071234s75c97876hb8bbeec4ca93cc1b@mail.gmail.com> <8905c87a0705081349s263c9a19pde99e2182553eb1d@mail.gmail.com> <8905c87a0705111621r746ddc0di344b070ac441e91c@mail.gmail.com> <4645B8E1.1020300@robmela.com> Message-ID: <464A632B.7010709@robmela.com> Jonathan Buch wrote: > Hi, > > >> I think that anyone who has more than a dozen models is someone who has >> spent some time with Nitro and already consulted some documentation. >> > > not necessarily true, I myself have never once looked in the Og doc dir > nor have tried or even looked at a single example. ;) > > Well... I was thinking of that alternate universe where the documentation does exist (a universe derived from this one by applying a forward shift in time...) > Well, lets figure someone, who's evaluating Og for use with a slightly > bigger project. He creates the general model layout, starts it for the > first time and it takes 20 seconds to start up. > I agree with Lester that this might not be the 'first expression' we > want to create. > > What about this idea: > > Creating a general startup/shutdown callback (just some array with > procs in it). This could then be used to provide a 'helper' which > just collects the start time, if it goes over 15 seconds it prints > a debug message saying 'quite a long startup, consider ' > > That's a good idea. It could grow to becomea general "performance tips" framework that inserts callbacks before and after certain methods in debug mode, but not loaded in production mode. Another option might be to have debug mode always run a single startup message like "run nitro --help' for performance and other hints". It's all good. -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070515/ece407e7/attachment.vcf From george.moschovitis at gmail.com Wed May 16 02:15:22 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 16 May 2007 09:15:22 +0300 Subject: [Nitro] Nitro support for Swiftiply In-Reply-To: References: Message-ID: ok, let me have a look at over the next couple of days and i will get back to you! thanks, -g. On 5/15/07, Kirk Haines wrote: > > On 5/15/07, George Moschovitis wrote: > > Hello Kirk, > > > > please excuse my ignorance, but what exactly is Switftiply? ;-) > > http://swiftiply.swiftcore.org > > Basically, it is a fast clustering proxy for web apps that also > includes a path for mongrel that makes Mongrel run in an evented > architecture instead of a threaded architecture. > > > Kirk > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070516/4f6cd874/attachment.html From george.moschovitis at gmail.com Sat May 19 20:05:02 2007 From: george.moschovitis at gmail.com (george.moschovitis at gmail.com) Date: Sun, 20 May 2007 00:05:02 +0000 (UTC) Subject: [Nitro] =?utf-8?q?=5BNP=2EORG=5D_Nitro/Og_Fora_daily_digest?= Message-ID: <20070520000502.164D48704@reizu.com> >From gmosx.myopenid.com Date: Sat May 19 07:33:26 UTC 2007 Subject: Aggregate and consolidate Javascript Message-ID: http://www.nitroproject.org/fora/posts/view/a7GxLmbDSr3jvheJeZaaqU Dear devs, can anyone suggest a way to automatically put all javascript files used by one application in a single file and then compress this file? I would like to add an automated system in Nitro that in LIVE mode automatically collects all javascript code in a single compressed file. If anyone knows of a related utility, please let me know. regards, -g. -- This mail is automatically generated from the http://nitroproject.org/fora digest robot. It presents the discussions in the fora during the last 24 hours. Do not reply to this email. From rob at robmela.com Sat May 19 22:21:12 2007 From: rob at robmela.com (Robert Mela) Date: Sat, 19 May 2007 22:21:12 -0400 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <20070520000502.164D48704@reizu.com> References: <20070520000502.164D48704@reizu.com> Message-ID: <464FB098.4010607@robmela.com> I'm not sure, but does jquery do something similar? If you look at the downloads on their front page there's jquery uncompressed, "Great for testing, learning, and development", and there's jquery compressed, "Great for production use". I think I downloaded either jquery or YUI and found there was a "build" process. I didn't look, but my guess is that a "build" consists of some packaging and compression, in which case their might be a loader to do the unpack client-side. Pure speculation on my part, but that's where I'd look. george.moschovitis at gmail.com wrote: > >From gmosx.myopenid.com > Date: Sat May 19 07:33:26 UTC 2007 > Subject: Aggregate and consolidate Javascript > Message-ID: http://www.nitroproject.org/fora/posts/view/a7GxLmbDSr3jvheJeZaaqU > > Dear devs, > > can anyone suggest a way to automatically put all javascript files used by one application in a single file and then compress this file? I would like to add an automated system in Nitro that in LIVE mode automatically collects all javascript code in a single compressed file. If anyone knows of a related utility, please let me know. > > regards, > -g. > > > > > -- > This mail is automatically generated from the http://nitroproject.org/fora > digest robot. It presents the discussions in the fora during the last 24 hours. > Do not reply to this email. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070519/51e4e17b/attachment.vcf From george.moschovitis at gmail.com Sun May 20 04:37:52 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 May 2007 11:37:52 +0300 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <464FB098.4010607@robmela.com> References: <20070520000502.164D48704@reizu.com> <464FB098.4010607@robmela.com> Message-ID: hm... will have a look at this. anyone else has more concrete info? -g. On 5/20/07, Robert Mela wrote: > > I'm not sure, but does jquery do something similar? If you look at the > downloads on their front page there's jquery uncompressed, "Great for > testing, learning, and development", and there's jquery compressed, > "Great for production use". I think I downloaded either jquery or YUI > and found there was a "build" process. I didn't look, but my guess is > that a "build" consists of some packaging and compression, in which case > their might be a loader to do the unpack client-side. > > Pure speculation on my part, but that's where I'd look. > > george.moschovitis at gmail.com wrote: > > >From gmosx.myopenid.com > > Date: Sat May 19 07:33:26 UTC 2007 > > Subject: Aggregate and consolidate Javascript > > Message-ID: > http://www.nitroproject.org/fora/posts/view/a7GxLmbDSr3jvheJeZaaqU > > > > Dear devs, > > > > can anyone suggest a way to automatically put all javascript files used > by one application in a single file and then compress this file? I would > like to add an automated system in Nitro that in LIVE mode automatically > collects all javascript code in a single compressed file. If anyone knows of > a related utility, please let me know. > > > > regards, > > -g. > > > > > > > > > > -- > > This mail is automatically generated from the > http://nitroproject.org/fora > > digest robot. It presents the discussions in the fora during the last 24 > hours. > > Do not reply to this email. > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070520/94b22204/attachment-0001.html From brian.william.davis at gmail.com Sun May 20 06:32:08 2007 From: brian.william.davis at gmail.com (Brian Davis) Date: Sun, 20 May 2007 03:32:08 -0700 Subject: [Nitro] [PATCH] Fix joins_many Message-ID: <20070520033208.458efbe5@localhost.localdomain> Attached is a patch that allows multiple many-to-many relations with the same component classes. It allows for situations like the following: class User ... many_to_many User many_to_many :friends, User many_to_many :enemies, User many_to_many :family, User ... end It does this by appending the join name to the tables of named join relations. As an illustration, the first relation above would describe a table named 'ogj_user_user', while the second relation would describe a table named 'ogj_user_user_friends'). This passes what few specs we've got for Og, so please let me know if it kills your cat or burns down your house. Brian -------------- next part -------------- A non-text attachment was scrubbed... Name: joins_many.patch.tar.gz Type: application/x-gzip Size: 11606 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070520/a52eddd8/attachment.gz From george.moschovitis at gmail.com Sun May 20 07:24:08 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 May 2007 14:24:08 +0300 Subject: [Nitro] [PATCH] Fix joins_many In-Reply-To: <20070520033208.458efbe5@localhost.localdomain> References: <20070520033208.458efbe5@localhost.localdomain> Message-ID: Thanks for the patch I will have a look at this later today... There is also another patch pending... -g. On 5/20/07, Brian Davis wrote: > > Attached is a patch that allows multiple many-to-many relations with > the same component classes. It allows for situations like the following: > > class User > ... > many_to_many User > many_to_many :friends, User > many_to_many :enemies, User > many_to_many :family, User > ... > end > > It does this by appending the join name to the tables of named join > relations. As an illustration, the first relation above would describe > a table named 'ogj_user_user', while the second relation would describe > a table named 'ogj_user_user_friends'). > > This passes what few specs we've got for Og, so please let me know if > it kills your cat or burns down your house. > > Brian > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070520/1a5c3831/attachment.html From rob at robmela.com Sun May 20 09:18:44 2007 From: rob at robmela.com (Robert Mela) Date: Sun, 20 May 2007 09:18:44 -0400 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: References: <20070520000502.164D48704@reizu.com> <464FB098.4010607@robmela.com> Message-ID: <46504AB4.8020907@robmela.com> Look at target name="pack" depends="jquery" http://dev.jquery.com/browser/trunk/jquery/build.xml May be somethign similar in YUI as well -- I haven't looked. George Moschovitis wrote: > hm... will have a look at this. anyone else has more concrete info? > -g. > > On 5/20/07, *Robert Mela* > > wrote: > > I'm not sure, but does jquery do something similar? If you look > at the > downloads on their front page there's jquery uncompressed, "Great for > testing, learning, and development", and there's jquery compressed, > "Great for production use". I think I downloaded either jquery > or YUI > and found there was a "build" process. I didn't look, but my guess is > that a "build" consists of some packaging and compression, in > which case > their might be a loader to do the unpack client-side. > > Pure speculation on my part, but that's where I'd look. > > george.moschovitis at gmail.com > wrote: > > >From gmosx.myopenid.com > > Date: Sat May 19 07:33:26 UTC 2007 > > Subject: Aggregate and consolidate Javascript > > Message-ID: > http://www.nitroproject.org/fora/posts/view/a7GxLmbDSr3jvheJeZaaqU > > > > > Dear devs, > > > > can anyone suggest a way to automatically put all javascript > files used by one application in a single file and then compress > this file? I would like to add an automated system in Nitro that > in LIVE mode automatically collects all javascript code in a > single compressed file. If anyone knows of a related utility, > please let me know. > > > > regards, > > -g. > > > > > > > > > > -- > > This mail is automatically generated from the > http://nitroproject.org/fora > > digest robot. It presents the discussions in the fora during the > last 24 hours. > > Do not reply to this email. > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://georgeandstella.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070520/f749e588/attachment.vcf From rob at robmela.com Sun May 20 14:38:31 2007 From: rob at robmela.com (Robert Mela) Date: Sun, 20 May 2007 14:38:31 -0400 Subject: [Nitro] Og and legacy tables In-Reply-To: References: <20070520033208.458efbe5@localhost.localdomain> Message-ID: <465095A7.8080001@robmela.com> I love Og because I can sketch out my ideas in the most intuitive way -- as objects, very concise ones at taht -- and the database tedium, including table creation, join tables, etc., is taken care of for me. But often it's necessary to work with pre-existing tables from another application, and in those cases, ActiveRecord adapts pretty well -- you can specify join table names ( e.g., :through ), override default table names and unique id field names, etc. I haven't seen anything in Og that looks like it creates classes based on an existing table schema. Would anyone be interested in seeing Og be able to wrap an existing table the way ActiveRecord can? It'd involve adding attributes to override Og's default table naming, allow arbitrary naming of the id field, and ways to specify join tables and foreign key names of related objects. It might also allow Nitro to leverage ActiveRecord::Migration for managing database upgrades and rollbacks. (Of course, it's possible these features are already possible with Og and this is simply an exercise in public humility, but there's value in that too... -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070520/ff54f0a1/attachment-0001.vcf From george.moschovitis at gmail.com Sun May 20 20:05:01 2007 From: george.moschovitis at gmail.com (george.moschovitis at gmail.com) Date: Mon, 21 May 2007 00:05:01 +0000 (UTC) Subject: [Nitro] =?utf-8?q?=5BNP=2EORG=5D_Nitro/Og_Fora_daily_digest?= Message-ID: <20070521000501.B23588741@reizu.com> >From gmosx.myopenid.com Date: Sun May 20 19:04:14 UTC 2007 Subject: New compiler filter Message-ID: http://www.nitroproject.org/fora/posts/view/dM3gJGbWqr3jvheJeZaaqU Dear devs, check out the blog for the description of a cool new Nitro feature... -g. -- This mail is automatically generated from the http://nitroproject.org/fora digest robot. It presents the discussions in the fora during the last 24 hours. Do not reply to this email. From john at oxyliquit.de Mon May 21 06:12:47 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 21 May 2007 13:12:47 +0300 Subject: [Nitro] Og and legacy tables In-Reply-To: <465095A7.8080001@robmela.com> References: <20070520033208.458efbe5@localhost.localdomain> <465095A7.8080001@robmela.com> Message-ID: Hi, just a quick reply. > But often it's necessary to work with pre-existing tables from another > application, and in those cases, ActiveRecord adapts pretty well -- you > can specify join table names ( e.g., :through ), override default table > names and unique id field names, etc. Og does adapts pretty well here too: You just have to model the Og classes after the real tables and adapt: class OgModel # To use a different pk attr_accessor :id, Fixnum, :primary_key => true # custom join tables joins_many :pictures, Picture, :through => ModelPics end class ModelPics # set the sql table set_sql_table "join_table_foo" # has_ones are needed to generate the correct relations # for example specify a special foreign key has_one OgModel, :foreign_key => 'to_model' has_one Picture end class Picture end Hope that makes you happy! Also see the test::unit regarding custom primary keys and http://oxyliquit.de/question/94 for a quick overview. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Mon May 21 06:35:51 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 21 May 2007 13:35:51 +0300 Subject: [Nitro] Og and legacy tables In-Reply-To: <465095A7.8080001@robmela.com> References: <20070520033208.458efbe5@localhost.localdomain> <465095A7.8080001@robmela.com> Message-ID: Hi, > It might also allow Nitro to leverage ActiveRecord::Migration for > managing database upgrades and rollbacks. This is one of the first things always asked by new people who come from AR to #nitro. Migrations. I always tell them, that Og doesn't have those, partly because of a different mindset: Og tells, how the result should look like, and adapts the DB accordingly, not the other way round. This is just one side of course, there may as well be a need for real migrations in Og, but who's going to implement that. We can't even get that shite testing mess fixed which G introduced. > (Of course, it's possible these features are already possible with Og > and this is simply an exercise in public humility, but there's value in > that too...) There's never a too dumb question. :) This merely shows that there are areas in Og which are unknown to the general public and only accessable to people like me who read the source over and over again. Nothing to be ashamed of, really. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Mon May 21 20:05:03 2007 From: george.moschovitis at gmail.com (george.moschovitis at gmail.com) Date: Tue, 22 May 2007 00:05:03 +0000 (UTC) Subject: [Nitro] =?utf-8?q?=5BNP=2EORG=5D_Nitro/Og_Fora_daily_digest?= Message-ID: <20070522000503.859348741@reizu.com> >From gmosx.myopenid.com Date: Mon May 21 12:08:48 UTC 2007 Subject: Special compare of Ruby Time objects Message-ID: http://www.nitroproject.org/fora/posts/view/airz-Eb5qr3jvheJeZaaqU Dear devs, is there an elegant way to find out if two Time objects represent the same day, ie ignore the hh:mm:ss part of the Time object in this comparisson? thanks in advance, -g. -- This mail is automatically generated from the http://nitroproject.org/fora digest robot. It presents the discussions in the fora during the last 24 hours. Do not reply to this email. From reid.thompson at ateb.com Mon May 21 20:18:42 2007 From: reid.thompson at ateb.com (Reid Thompson) Date: Mon, 21 May 2007 20:18:42 -0400 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <20070522000503.859348741@reizu.com> References: <20070522000503.859348741@reizu.com> Message-ID: <465236E2.3020200@ateb.com> george.moschovitis at gmail.com wrote: > >From gmosx.myopenid.com > Date: Mon May 21 12:08:48 UTC 2007 > Subject: Special compare of Ruby Time objects > Message-ID: http://www.nitroproject.org/fora/posts/view/airz-Eb5qr3jvheJeZaaqU > > Dear devs, > > is there an elegant way to find out if two Time objects represent the same day, ie ignore the hh:mm:ss part of the Time object in this comparisson? > > thanks in advance, > -g. > > > > > -- > This mail is automatically generated from the http://nitroproject.org/fora > digest robot. It presents the discussions in the fora during the last 24 hours. > Do not reply to this email. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > is t1 = Time.now t2 = Time.now if (t1.day == t2.day) then puts "the days are the same" else puts "the days are different" end t2 = t2 + 100323 if (t1.day == t2.day) then puts "the days are the same" else puts "the days are different" end elegant???? From billk at cts.com Mon May 21 20:28:09 2007 From: billk at cts.com (Bill Kelly) Date: Mon, 21 May 2007 17:28:09 -0700 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> Message-ID: <116001c79c08$132ee3e0$6442a8c0@musicbox> From: "Reid Thompson" > george.moschovitis at gmail.com wrote: >> >> is there an elegant way to find out if two Time objects represent >> the same day, ie ignore the hh:mm:ss part of the Time object in >> this comparisson? >> > is > > t1 = Time.now > t2 = Time.now > > if (t1.day == t2.day) > then > puts "the days are the same" > else > puts "the days are different" > end > > t2 = t2 + 100323 > > if (t1.day == t2.day) > then > puts "the days are the same" > else > puts "the days are different" > end > > elegant???? Note that Time#day refers to the day of the month, such that: (assuming a 31 day month) irb(main):050:0> Time.now.day => 21 irb(main):051:0> (Time.now + (24 * 60 * 60 * 31)).day => 21 If that's not acceptable, and you only want the times to be equal on the exact same day, you could do: if (t1.year == t2.year && t1.yday == t2.yday) . . . Regards, Bill From janm-nitro at transactionware.com Mon May 21 21:32:48 2007 From: janm-nitro at transactionware.com (Jan Mikkelsen) Date: Tue, 22 May 2007 11:32:48 +1000 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <116001c79c08$132ee3e0$6442a8c0@musicbox> References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> <116001c79c08$132ee3e0$6442a8c0@musicbox> Message-ID: <46524840.7070701@transactionware.com> Bill Kelly wrote: > From: "Reid Thompson" > > george.moschovitis at gmail.com wrote: > >> > >> is there an elegant way to find out if two Time objects > represent > >> the same day, ie ignore the hh:mm:ss part of the Time > object in > >> this comparisson? > >> > > is > > > > t1 = Time.now > > t2 = Time.now > > > > if (t1.day == t2.day) > > then > > puts "the days are the same" > > else > > puts "the days are different" > > end > > > > t2 = t2 + 100323 > > > > if (t1.day == t2.day) > > then > > puts "the days are the same" > > else > > puts "the days are different" > > end > > > > elegant???? > > Note that Time#day refers to the day of the month, such that: > (assuming a 31 day month) > > irb(main):050:0> Time.now.day > => 21 > irb(main):051:0> (Time.now + (24 * 60 * 60 * 31)).day > => 21 > > If that's not acceptable, and you only want the times to > be equal on the exact same day, you could do: > > if (t1.year == t2.year && t1.yday == t2.yday) > . . . Or, use arrays: [t1.year, t1.month, t1.day] == [t2.year, t2.month, t2.day] Or, use a class make is obvious what is going on: class Date include Comparable attr :val def initialize(t) @val = [ t.year, t.month, t.day ] end def <=>(other) @val.<=>(other.val) end end if Date(t1) == Date(t2) ... elsif Date(t1) < Date(t2) ... end (I'm here checking out Nitro and Og ...) Regards, Jan Mikkelsen From janm-nitro at transactionware.com Mon May 21 22:20:50 2007 From: janm-nitro at transactionware.com (Jan Mikkelsen) Date: Tue, 22 May 2007 12:20:50 +1000 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <46524840.7070701@transactionware.com> References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> <116001c79c08$132ee3e0$6442a8c0@musicbox> <46524840.7070701@transactionware.com> Message-ID: <46525382.5030604@transactionware.com> Jan Mikkelsen wrote: > [ Slightly broken Ruby elided ] Gee, I shouldn't write off-the-cuff Ruby with my head fully loaded with C++. Let's try that again: class Date include Comparable attr :val def initialize(t) @val = [ t.year, t.month, t.day ] end def <=>(other) @val <=> other.val end end if Date.new(t1) == Date.new(t2) ... elsif Date.new(t1) < Date.new(t2) ... end Anyway, you get the idea! Regards, Jan Mikkelsen From george.moschovitis at gmail.com Tue May 22 02:13:36 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 May 2007 09:13:36 +0300 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <465236E2.3020200@ateb.com> References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> Message-ID: it doesnt check month/year... On 5/22/07, Reid Thompson wrote: > > george.moschovitis at gmail.com wrote: > > >From gmosx.myopenid.com > > Date: Mon May 21 12:08:48 UTC 2007 > > Subject: Special compare of Ruby Time objects > > Message-ID: > http://www.nitroproject.org/fora/posts/view/airz-Eb5qr3jvheJeZaaqU > > > > Dear devs, > > > > is there an elegant way to find out if two Time objects represent the > same day, ie ignore the hh:mm:ss part of the Time object in this > comparisson? > > > > thanks in advance, > > -g. > > > > > > > > > > -- > > This mail is automatically generated from the > http://nitroproject.org/fora > > digest robot. It presents the discussions in the fora during the last 24 > hours. > > Do not reply to this email. > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > is > > t1 = Time.now > t2 = Time.now > > if (t1.day == t2.day) > then > puts "the days are the same" > else > puts "the days are different" > end > > t2 = t2 + 100323 > > if (t1.day == t2.day) > then > puts "the days are the same" > else > puts "the days are different" > end > > elegant???? > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070522/d651d926/attachment.html From george.moschovitis at gmail.com Tue May 22 02:14:45 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 May 2007 09:14:45 +0300 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <116001c79c08$132ee3e0$6442a8c0@musicbox> References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> <116001c79c08$132ee3e0$6442a8c0@musicbox> Message-ID: > > if (t1.year == t2.year && t1.yday == t2.yday) > this is slightly better from what I use, but still I hoped there was something more elegant/clever. -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070522/5829451d/attachment-0001.html From john at oxyliquit.de Tue May 22 08:22:24 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 22 May 2007 15:22:24 +0300 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: <46524840.7070701@transactionware.com> References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> <116001c79c08$132ee3e0$6442a8c0@musicbox> <46524840.7070701@transactionware.com> Message-ID: Hi, > (I'm here checking out Nitro and Og ...) welcome to Nitro, glad to see new faces. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Tue May 22 08:32:47 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 May 2007 15:32:47 +0300 Subject: [Nitro] [NP.ORG] Nitro/Og Fora daily digest In-Reply-To: References: <20070522000503.859348741@reizu.com> <465236E2.3020200@ateb.com> <116001c79c08$132ee3e0$6442a8c0@musicbox> <46524840.7070701@transactionware.com> Message-ID: On 5/22/07, Jonathan Buch wrote: > > Hi, > > > (I'm here checking out Nitro and Og ...) > > welcome to Nitro, glad to see new faces. :) Me too :) -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070522/599ff582/attachment.html From beingthexemplarylists at gmail.com Tue May 22 10:01:49 2007 From: beingthexemplarylists at gmail.com (aaron smith) Date: Tue, 22 May 2007 10:01:49 -0400 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF Message-ID: Hey All, I need some help making an adapter for ObjectGraph. It's for the project RubyAMF. What I'm looking for is some logic from your database library when doing database queries and getting results back. Currently I have Mysql and ActiveRecord adapters and am looking to expand upon those with ObjectGraph. Here are examples of the output I need in order to correctly implement an adapter for ObjectGraph. There are 4 important things I need after a query or DB operation has been performed. Note that the only operation ever returned is a Query of some sort 1: The result class and data structure 2: The column names returned in the query 3: The row count 4: The actual returned data An example Mysql set of statements that gives me the desired output is: ===================================== @con = Mysql.connect('localhost','root','') @con.select_db('mydb') result = @con.query("SELECT * FROM MYTABLE") puts result.class.to_s #1-> Mysql::Result fields = result.fetch_fields column_names = [] #2 fields.each do |field| column_names << field end row_count = result.num_rows #3 data = result #4 ==================================== In the above example #1,#2,#3 and #4 correlate to the data needed that is listed above. Now for an ORM (such as ActiveRecord) I need the same info but for two different situations. Becaue ActiveRecord results with more than one row are always an Array of ActiveRecord::Base or if there is one result it is just an ActiveRecord::Base To find the desired data for a SINGLE ActiveRecord these statements do the trick: ==================================== ##connect_active_record r = SomeModel.find(1) puts r.class.to_s #1-> ActiveRecord::Base puts r.class.column_names #2 puts "1" #-> one row #3 column_names.each do |key| data << r.attributes[key] end puts data #-> #4 ==================================== Now for multiple records found from ActiveRecord, an Array of ActiveRecord::Base is returned. To get the desired info I have to do this now: ==================================== @@connect_active_record r = SomeModel.find(:all) puts r.class.to_s #1-> Array puts r[0].class.superclass.name #1-> ActiveRecord::Base column_names = r[0].class.column_names #2 row_count = r.length #3 data = [] 0.upto(r.length) do |i| row = [] column_names.each do |key| row << r[i].attributes[key] end data << row end data #4 ==================================== In the multiple ActiveRecord::Base example above. #1 is referened 2 times because those two pieces of information help me determine that it is indeed an ActiveRecord.. (if(r.class == "Array" && r[0].class.superclass == "ActiveRecord::Base") .. ) So if anyone can help me, I would really appreciate it. As having to install every single database is kind of a pain and not really the best option. If whoever helps would provide code snippets that they had to write in order to get the same data, I can use that in creating the ObjectGraph adapters. -Thanks Aaron From john at oxyliquit.de Tue May 22 10:56:35 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 22 May 2007 17:56:35 +0300 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: Hi, let's hope I can help you out here. (here be rest of Og setup and Og.start) > 1: The result class and data structure Are you sure you want the raw result class? Wouldn't some kind of Hash, OpenObject, Struct suffice? However, this does work with Og. SomeModel.ogmanager.with_store do |store| result = store.query("SELECT") end as the result 'data structure' however changes even between databases (postgresql pure ruby, postgresql extension) I would advise against that. # returns an array result = SomeModel.find() # ask if you need more help with Og queries > 2: The column names returned in the query column_names = SomeModel.serializable_attributes > 3: The row count row_count = result.size > 4: The actual returned data Are you sure you want an array here? (like in the AR example) result.inject([]) do |array,some_model| array << column_names.inject({}) do |hash,col| hash[col] = some_model.send(col) hash end end will produce a big array with hashes inside, adapt as necessary. I hope that helps! Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From beingthexemplarylists at gmail.com Tue May 22 11:11:16 2007 From: beingthexemplarylists at gmail.com (aaron smith) Date: Tue, 22 May 2007 11:11:16 -0400 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: On 5/22/07, Jonathan Buch wrote: > Hi, > > let's hope I can help you out here. > > > (here be rest of Og setup and Og.start) > > > 1: The result class and data structure > > Are you sure you want the raw result class? Wouldn't some kind of Hash, > OpenObject, Struct suffice? > > However, this does work with Og. > > SomeModel.ogmanager.with_store do |store| > result = store.query("SELECT") > end > > as the result 'data structure' however changes even between databases > (postgresql pure ruby, postgresql extension) I would advise against > that. > > # returns an array > result = SomeModel.find() # ask if you need more help with Og queries > > > 2: The column names returned in the query > > column_names = SomeModel.serializable_attributes > > > 3: The row count > > row_count = result.size > > > 4: The actual returned data > > Are you sure you want an array here? (like in the AR example) > > result.inject([]) do |array,some_model| > array << column_names.inject({}) do |hash,col| > hash[col] = some_model.send(col) > hash > end > end > > will produce a big array with hashes inside, adapt as necessary. > > I hope that helps! > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > Thanks!, That just about sets me up for ObjectGraph adapter. Couple more questions: ---For this line: result = SomeModel.find() # ask if you need more help with Og queries" ---Does object graph work the same way active record does? If there is one result it is a object ObjectGraph::Result. And if it is multiple rows it is an Array of ObjectGraph::Result. If not and it always returns an array, do any of the items in the array have a special class name (IE: result[0] -> ObjectGraph::Something?). That is how I am finding out that this "result" is an ObjectGraph result. ---For column names. Is there anyway I can get the column names off of the "result" object, not the "SomeModel" class. As when a result is returned to me I don't know about the models, just the resulting object. --Thanks so much for your help. -Aaron From john at oxyliquit.de Tue May 22 11:48:58 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 22 May 2007 18:48:58 +0300 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: Hi, > ---For this line: > result = SomeModel.find() # ask if you need more help with Og queries" > ---Does object graph work the same way active record does? If there is > one result it is a object ObjectGraph::Result. And if it is multiple > rows it is an Array of ObjectGraph::Result. If not and it always > returns an array, do any of the items in the array have a special > class name (IE: result[0] -> ObjectGraph::Something?). That is how I > am finding out that this "result" is an ObjectGraph result. # Will always return an array if there are results, nil if there is no # result. Array contents are always .kind_of?(Og::Model) result = SomeModel.find() # will return return a .kind_of?(Og::Model) or nil if nothing found result = SomeModel.find_one() So yes, you can rely on result[0].kind_of?(Og::Model) if somethings has been found. > ---For column names. > Is there anyway I can get the column names off of the "result" object, > not the "SomeModel" class. As when a result is returned to me I don't > know about the models, just the resulting object. Ah of course. :P As you can get the class from the object. :) if result[0].kind_of?(Og::Model) result[0].class.serializable_attributes end Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From beingthexemplarylists at gmail.com Tue May 22 12:12:35 2007 From: beingthexemplarylists at gmail.com (aaron smith) Date: Tue, 22 May 2007 12:12:35 -0400 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: On 5/22/07, Jonathan Buch wrote: > Hi, > > > ---For this line: > > result = SomeModel.find() # ask if you need more help with Og queries" > > ---Does object graph work the same way active record does? If there is > > one result it is a object ObjectGraph::Result. And if it is multiple > > rows it is an Array of ObjectGraph::Result. If not and it always > > returns an array, do any of the items in the array have a special > > class name (IE: result[0] -> ObjectGraph::Something?). That is how I > > am finding out that this "result" is an ObjectGraph result. > > # Will always return an array if there are results, nil if there is no > # result. Array contents are always .kind_of?(Og::Model) > result = SomeModel.find() > > # will return return a .kind_of?(Og::Model) or nil if nothing found > result = SomeModel.find_one() > > So yes, you can rely on result[0].kind_of?(Og::Model) if somethings has > been found. > > > ---For column names. > > Is there anyway I can get the column names off of the "result" object, > > not the "SomeModel" class. As when a result is returned to me I don't > > know about the models, just the resulting object. > > Ah of course. :P As you can get the class from the object. :) > > if result[0].kind_of?(Og::Model) > result[0].class.serializable_attributes > end > > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > Sweet! That is everything I need! #duh, i had that in the active record example.. Thanks! if result[0].kind_of?(Og::Model) result[0].class.serializable_attributes Thanks a lot! end From beingthexemplarylists at gmail.com Wed May 23 19:05:36 2007 From: beingthexemplarylists at gmail.com (aaron smith) Date: Wed, 23 May 2007 19:05:36 -0400 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: On 5/22/07, aaron smith wrote: > On 5/22/07, Jonathan Buch wrote: > > Hi, > > > > > ---For this line: > > > result = SomeModel.find() # ask if you need more help with Og queries" > > > ---Does object graph work the same way active record does? If there is > > > one result it is a object ObjectGraph::Result. And if it is multiple > > > rows it is an Array of ObjectGraph::Result. If not and it always > > > returns an array, do any of the items in the array have a special > > > class name (IE: result[0] -> ObjectGraph::Something?). That is how I > > > am finding out that this "result" is an ObjectGraph result. > > > > # Will always return an array if there are results, nil if there is no > > # result. Array contents are always .kind_of?(Og::Model) > > result = SomeModel.find() > > > > # will return return a .kind_of?(Og::Model) or nil if nothing found > > result = SomeModel.find_one() > > > > So yes, you can rely on result[0].kind_of?(Og::Model) if somethings has > > been found. > > > > > ---For column names. > > > Is there anyway I can get the column names off of the "result" object, > > > not the "SomeModel" class. As when a result is returned to me I don't > > > know about the models, just the resulting object. > > > > Ah of course. :P As you can get the class from the object. :) > > > > if result[0].kind_of?(Og::Model) > > result[0].class.serializable_attributes > > end > > > > > > Jo > > > > -- > > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > Sweet! That is everything I need! > > #duh, i had that in the active record example.. Thanks! > if result[0].kind_of?(Og::Model) > result[0].class.serializable_attributes > > Thanks a lot! > end > Hey Jo, Is there an easier way of doing this: result.inject([]) do |array,some_model| array << column_names.inject({}) do |hash,col| hash[col] = some_model.send(col) hash end end Just seems like a lot of work. Also If I do have to do it that way, where does the some_model variable come from? thanks Aaron From john at oxyliquit.de Thu May 24 02:07:23 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 24 May 2007 09:07:23 +0300 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: Hi, > Is there an easier way of doing this: > result.inject([]) do |array,some_model| > array << column_names.inject({}) do |hash,col| > hash[col] = some_model.send(col) > hash > end > end > Just seems like a lot of work. Also If I do have to do it that way, > where does the some_model variable come from? Ah, no, of course you don't. :) Use any Ruby means of iterating over 2 lists (result which has Og objects, column_names which has symbols which lead to methods on the models). I get from your answer, that you're not yet fully comfortable with Ruby as of yet. Read up the standard documentation for `.inject`. In fact .inject shouldn't really be used, as it's slow and can lead to misunderstandings. It just flows from my fingers. :P rows = [] result.each do |some_model| row = [] column_names.each do |col| row << some_model.send(col) end rows << row end This is probably more readable to you. Your AR part does the same in a slightly uglier way (.upto(.length) is unnecessary here). Hope that helps, Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From beingthexemplarylists at gmail.com Thu May 24 08:55:35 2007 From: beingthexemplarylists at gmail.com (aaron smith) Date: Thu, 24 May 2007 08:55:35 -0400 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: On 5/24/07, Jonathan Buch wrote: > Hi, > > > Is there an easier way of doing this: > > result.inject([]) do |array,some_model| > > array << column_names.inject({}) do |hash,col| > > hash[col] = some_model.send(col) > > hash > > end > > end > > > Just seems like a lot of work. Also If I do have to do it that way, > > where does the some_model variable come from? > > Ah, no, of course you don't. :) Use any Ruby means of iterating > over 2 lists (result which has Og objects, column_names which has > symbols which lead to methods on the models). > > I get from your answer, that you're not yet fully comfortable with > Ruby as of yet. Read up the standard documentation for `.inject`. > In fact .inject shouldn't really be used, as it's slow and can > lead to misunderstandings. It just flows from my fingers. :P > > rows = [] > result.each do |some_model| > row = [] > column_names.each do |col| > row << some_model.send(col) > end > rows << row > end > > This is probably more readable to you. Your AR part does the same > in a slightly uglier way (.upto(.length) is unnecessary here). > > Hope that helps, > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > Yeah that helps. I'm pretty comfortable with Ruby actually. I just knew that using inject is slow. At least slower than results.each. thanks From arne at arnebrasseur.net Mon May 28 05:22:31 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 28 May 2007 11:22:31 +0200 Subject: [Nitro] uninitialized constant Module::Dispatcher Message-ID: <465A9F57.9000904@arnebrasseur.net> Hello nitro folks, I've been looking at Nitro lately and I must say I like what I've seen so far. I downloaded the latest darcs version of both nitro and facets, and when I try to start my app it says: /home/plexus/work/nitro_og/nitro/lib/nitro.rb:72:in `start': uninitialized constant Module::Dispatcher (NameError) from ./run.rb:31 Looking at nitro.rb the outline is along the lines of module Nitro include Raw #this contains Dispatcher class < References: <465A9F57.9000904@arnebrasseur.net> Message-ID: try to add the following command at the top of app.rb: include Nitro and let me know if this fixes your problem. (This is btw a known problem with the repo version). welcome to our community, George. On 5/28/07, Arne Brasseur wrote: > > Hello nitro folks, > > I've been looking at Nitro lately and I must say I like what I've seen > so far. I downloaded the latest darcs version of both nitro and facets, > and when I try to start my app it says: > > /home/plexus/work/nitro_og/nitro/lib/nitro.rb:72:in `start': > uninitialized constant Module::Dispatcher (NameError) > from ./run.rb:31 > > Looking at nitro.rb the outline is along the lines of > > module Nitro > include Raw #this contains Dispatcher > > class < def start(controller) > ... > @application.dispatcher = Dispatcher.new(controller) #looks > for Module::Dispatcher in stead of Raw::Dispatcher > ... > end > end > end > > I'm running ruby 1.8.4. > > Any help on how to resolve this would be very appreciated. > > Arne > > -- > Arne Brasseur @ your service > arne at arnebrasseur.net > +32/496/94.55.63 > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070528/91929a2b/attachment.html From arne at arnebrasseur.net Mon May 28 13:29:10 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 28 May 2007 19:29:10 +0200 Subject: [Nitro] Beginning of a tutorial Message-ID: <465B1166.2090004@arnebrasseur.net> Hi all, I spend the afternoon playing around getting to know Nitro. As an aid to my future self and for the benefit of others starting out with Nitro I started writing a tutorial documenting the things I discovered in the source. It can be found at http://wiki.arnebrasseur.net/NitroOg/NitroTutorial It's really only a start, there are details in there that are probably mentioned too early on to be really useful, and probably lots of more important things aren't mentioned. Nevertheless writing it helped me a lot to understand the basic structure of a Nitro app. I would like it to evolve into a lengthy tutorial that starts with the basics but builds up quickly, touching on all relevant subjects, with subpages explaining subjects in depth. Perhaps there are other newcomers like me lurking on this list, I would love to hear if they find it useful. Seasoned nitro veterans may obviously skim it to point out any obvious errors from my part ;) The wiki is public, no sign up required so if you feel the urge to press 'edit', by all means please do so. Thanks for listening, Arne -- Arne Brasseur @ your service arne at arnebrasseur.net +32/496/94.55.63 From arne at arnebrasseur.net Mon May 28 14:04:21 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 28 May 2007 20:04:21 +0200 Subject: [Nitro] uninitialized constant Module::Dispatcher In-Reply-To: References: <465A9F57.9000904@arnebrasseur.net> Message-ID: <465B19A5.7050205@arnebrasseur.net> George Moschovitis schreef: > try to add the following command at the top of app.rb: > > include Nitro That worked, indeed. > welcome to our community, Thank you :) It looks like the repository version has drastically changed from the latest release. Is there something like an official 'roadmap' for nitro? Any plans yet for the next release? Also, what are the criteria for putting something in Raw or in Nitro? I can only say that the more I see of Nitro, the more I like it. I'm very curious as to how it will evolve. (ab) -- Arne Brasseur @ your service arne at arnebrasseur.net +32/496/94.55.63 From george.moschovitis at gmail.com Mon May 28 14:57:02 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 May 2007 21:57:02 +0300 Subject: [Nitro] uninitialized constant Module::Dispatcher In-Reply-To: <465B19A5.7050205@arnebrasseur.net> References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> Message-ID: > > latest release. Is there something like an official 'roadmap' for nitro? > Any plans yet for the next release? > The immediate roadmap goes like this: - finish the blog example - convert tests to specs - release 0.50.0 sadly I was busy lately (first my marriage, then some work) and we are behind schedule :( -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070528/a0b8b04d/attachment.html From george.moschovitis at gmail.com Mon May 28 15:01:15 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 May 2007 22:01:15 +0300 Subject: [Nitro] Nitro/Ruby planet Message-ID: Dear devs... I would like a planet-like section to the nitroproject.org site. In fact I would like to add two 'planets': 1. nitro planet 2. ruby planet obviously #1 will be a rather small planet, but still I would like to hear suggestions for both of them. I would like rss/atom feeds. regards, George. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070528/9ab3f20d/attachment.html From george.moschovitis at gmail.com Mon May 28 14:58:14 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 May 2007 21:58:14 +0300 Subject: [Nitro] Beginning of a tutorial In-Reply-To: <465B1166.2090004@arnebrasseur.net> References: <465B1166.2090004@arnebrasseur.net> Message-ID: This looks nice :) -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070528/a35761f7/attachment.html From john at oxyliquit.de Tue May 29 05:06:58 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 May 2007 12:06:58 +0300 Subject: [Nitro] Beginning of a tutorial In-Reply-To: <465B1166.2090004@arnebrasseur.net> References: <465B1166.2090004@arnebrasseur.net> Message-ID: Hi, > I spend the afternoon playing around getting to know Nitro. As an aid to > my future self and for the benefit of others starting out with Nitro I > started writing a tutorial documenting the things I discovered in the > source. many thanks for this new source of documentation, and welcome to the Nitro community! I like your tutorial, so far only 1 minor 'issue': class MyController This is nice for 'showing off' how nice Nitro reads at the beginning. When you start using this controller, you'll miss some very necessary features which make the controller unuseable for anything slightly more complex than 'hello world'. class MyController < Nitro::Controller This enables one to use the session/request/response methods. (Of course my knowledge may be outdated here with the new dev repo.) That said, thank you very much again, Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Tue May 29 05:09:21 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 May 2007 12:09:21 +0300 Subject: [Nitro] Nitro/Ruby planet In-Reply-To: References: Message-ID: Hi, > I would like a planet-like section to the nitroproject.org site. In fact > I would like to add two 'planets': > > 1. nitro planet > 2. ruby planet > > obviously #1 will be a rather small planet, but still I would like to > hear suggestions for both of them. I would like rss/atom feeds. I'd say just name it nitro planet (as it's for the nitro crowd anyway), as there's an official 'ruby planet' already. So it'll be a slightly bigger planet, and there won't be enough traffic to miss nitro specific ones. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Tue May 29 05:21:14 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 May 2007 12:21:14 +0300 Subject: [Nitro] Nitro/Ruby planet In-Reply-To: References: Message-ID: > > as there's an official 'ruby planet' already. So it'll be a slightly > which is the official ruby planet? -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070529/b54786ed/attachment.html From john at oxyliquit.de Tue May 29 06:01:47 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 May 2007 13:01:47 +0300 Subject: [Nitro] Nitro/Ruby planet In-Reply-To: References: Message-ID: Hi, >> as there's an official 'ruby planet' already. So it'll be a slightly >> > > which is the official ruby planet? Maybe 'official' was the wrong word here. But I take it that a 'planet' is an aggregator collecting feeds, right? There's Planet Ruby: http://planetruby.0x42.net/rss20.xml Also nice: http://app.feeddigest.com/digest3/75FTX0S2TH.rss Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Tue May 29 06:01:54 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 May 2007 13:01:54 +0300 Subject: [Nitro] Help creating a ObjectGraph adapter for RubyAMF In-Reply-To: References: Message-ID: Hi, > Sweet! That is everything I need! > Thanks a lot! you are very welcome, and I thank you for 'spreading the word'. :) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Tue May 29 15:28:03 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 29 May 2007 21:28:03 +0200 Subject: [Nitro] returning string from controller method In-Reply-To: References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> Message-ID: <465C7EC3.7030808@arnebrasseur.net> George Moschovitis schreef: > The immediate roadmap goes like this: > > - finish the blog example > - convert tests to specs > - release 0.50.0 That's great. I found the relevant thread now. On a related note, I was trying out my examples against the latest repo version, and simply returning a string from a controller apparently no longer works. Will this be the 0.50.0 behaviour? I can't recall that it was mentioned here, I would just like my documentation to be as up-to-date as possible. > > first my marriage, > Congratulations! (a bit late, I know) (ab) -- Arne Brasseur @ your service arne at arnebrasseur.net +32/496/94.55.63 From george.moschovitis at gmail.com Tue May 29 16:03:00 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 May 2007 23:03:00 +0300 Subject: [Nitro] returning string from controller method In-Reply-To: <465C7EC3.7030808@arnebrasseur.net> References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> <465C7EC3.7030808@arnebrasseur.net> Message-ID: > > On a related note, I was trying out my examples against the latest repo > version, and simply returning a string from a controller apparently no > longer works. Will this be the 0.50.0 behaviour? Yeah, this is dissabled at the moment, but I will consider bringing this back... -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070529/29cc0eb2/attachment.html From arne at arnebrasseur.net Tue May 29 17:04:50 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 29 May 2007 23:04:50 +0200 Subject: [Nitro] command line options Message-ID: <465C9572.3090701@arnebrasseur.net> I started documenting the nitro command line options on http://wiki.arnebrasseur.net/NitroOg/CommandLineOptions , this struck me as being probably a copy-paste error: in nitro/lib/nitro/application/args.rb # Run with Webrick adapter. def __webrick @application.adapter = :mongrel ----> :webrick? end # Run with Mongrel adapter. def __mongrel @application.adapter = :mongrel end (ab) -- Arne Brasseur @ your service arne at arnebrasseur.net +32/496/94.55.63 From george.moschovitis at gmail.com Tue May 29 17:26:38 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 May 2007 00:26:38 +0300 Subject: [Nitro] command line options In-Reply-To: <465C9572.3090701@arnebrasseur.net> References: <465C9572.3090701@arnebrasseur.net> Message-ID: thanks for catching this one! -g. On 5/30/07, Arne Brasseur wrote: > > I started documenting the nitro command line options on > http://wiki.arnebrasseur.net/NitroOg/CommandLineOptions , > this struck me as being probably a copy-paste error: > > in nitro/lib/nitro/application/args.rb > > # Run with Webrick adapter. > > def __webrick > @application.adapter = :mongrel ----> :webrick? > end > > # Run with Mongrel adapter. > > def __mongrel > @application.adapter = :mongrel > end > > (ab) > > -- > Arne Brasseur @ your service > arne at arnebrasseur.net > +32/496/94.55.63 > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070530/f91661b6/attachment.html From wyhaines at gmail.com Tue May 29 18:11:30 2007 From: wyhaines at gmail.com (Kirk Haines) Date: Tue, 29 May 2007 15:11:30 -0700 Subject: [Nitro] Nitro support for Swiftiply In-Reply-To: References: Message-ID: On 5/15/07, George Moschovitis wrote: > > ok, let me have a look at over the next couple of days and i will get back > to you! Have you come to any conclusions on the best way to go about providing Swiftiply support for Nitro? Thanks, Kirk Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070529/72f12762/attachment.html From john at oxyliquit.de Wed May 30 01:52:29 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 30 May 2007 08:52:29 +0300 Subject: [Nitro] returning string from controller method In-Reply-To: References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> <465C7EC3.7030808@arnebrasseur.net> Message-ID: Hi, >> On a related note, I was trying out my examples against the latest repo >> version, and simply returning a string from a controller apparently no >> longer works. Will this be the 0.50.0 behaviour? > > > Yeah, this is disabled at the moment, but I will consider bringing this > back... I vote for bringing the old way back, as it prevents the following ruby -e 'require "rubygems"; require "nitro"; class MyController; def index; "Hello World"; end; end; Nitro.start(MyController)' from working. :) Everytime someone comes into the channel asking how Nitro looks like, I use this example. I'd hate to loose it as it's a really sweet case on how non-intrusive Nitro is and never fails to catch attention. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Wed May 30 02:19:14 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 May 2007 09:19:14 +0300 Subject: [Nitro] returning string from controller method In-Reply-To: References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> <465C7EC3.7030808@arnebrasseur.net> Message-ID: Ok... I remember there was a reason I removed it though... not sure what it was... -g. On 5/30/07, Jonathan Buch wrote: > > Hi, > > >> On a related note, I was trying out my examples against the latest repo > >> version, and simply returning a string from a controller apparently no > >> longer works. Will this be the 0.50.0 behaviour? > > > > > > Yeah, this is disabled at the moment, but I will consider bringing this > > back... > > I vote for bringing the old way back, as it prevents the following > > ruby -e 'require "rubygems"; require "nitro"; class MyController; def > index; "Hello World"; end; end; Nitro.start(MyController)' > > from working. :) Everytime someone comes into the channel asking how > Nitro looks like, I use this example. I'd hate to loose it as it's > a really sweet case on how non-intrusive Nitro is and never fails to > catch attention. > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070530/f8b04418/attachment-0001.html From john at oxyliquit.de Wed May 30 06:15:29 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 30 May 2007 13:15:29 +0300 Subject: [Nitro] returning string from controller method In-Reply-To: References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> <465C7EC3.7030808@arnebrasseur.net> Message-ID: Hi, > Ok... I remember there was a reason I removed it though... not sure what > it was... well, there was also a reason to disable multi-level parameter parsing, which should come back again. ;) Just a reminder. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Wed May 30 07:12:56 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 May 2007 14:12:56 +0300 Subject: [Nitro] returning string from controller method In-Reply-To: References: <465A9F57.9000904@arnebrasseur.net> <465B19A5.7050205@arnebrasseur.net> <465C7EC3.7030808@arnebrasseur.net> Message-ID: oops, right... -g. On 5/30/07, Jonathan Buch wrote: > > Hi, > > > Ok... I remember there was a reason I removed it though... not sure what > > it was... > > well, there was also a reason to disable multi-level parameter parsing, > which should come back again. ;) > Just a reminder. :) > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070530/b46e39cf/attachment.html From Reid.Thompson at ateb.com Wed May 30 07:37:54 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Wed, 30 May 2007 07:37:54 -0400 Subject: [Nitro] OT Web registration tool digitizes books Message-ID: <1180525074.7037.1.camel@jhereg> http://www.cnn.com/2007/TECH/05/29/blather.to.books.ap/index.html interesting. From transfire at gmail.com Wed May 30 19:08:36 2007 From: transfire at gmail.com (Trans) Date: Wed, 30 May 2007 23:08:36 -0000 Subject: [Nitro] Fora is down and cleaning the website. Message-ID: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> Seems the Fora is down. Honestly, I don't generally surf the Fora, but occasionally I give it a glance. So I wonder how long it's been down. On another site note, it would be nice to see a reasonably complete website. I don't think theres been one for, like, forever. I really feel like the site trying to do and be too much --and hence only does anything half as well as it should/could. So how bout remarking out the dead links (with ) until they actually exist? There's some empty picture-link spaces too. How bout adding one for Oxywtf, which is an invaluable resource to Nitro and deserves some front page respect. You could add a picture-link for Facets too. You need one more to picture-link to finish the front-page, but I'm sure there's something we can use. Then at least the site will look fully operational, rather than half-finished, even if it's not ultimately how it's intended to be. T. From transfire at gmail.com Wed May 30 19:10:33 2007 From: transfire at gmail.com (Trans) Date: Wed, 30 May 2007 23:10:33 -0000 Subject: [Nitro] Fora is down and cleaning the website. In-Reply-To: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> References: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> Message-ID: <1180566633.880631.52160@h2g2000hsg.googlegroups.com> Oh, forgot one other thing. The drop-down menus don't work correctly. When I highlight one I can get to the sub-menu items b/c they disappear when I move my mouse off the menu item. T. From george.moschovitis at gmail.com Thu May 31 02:34:00 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 May 2007 09:34:00 +0300 Subject: [Nitro] Nitro / Ruby planet Message-ID: Dear devs, I just created a new planet for Nitro and Og related feeds. You can access this planet at: http://phidz.com/Nitro There is also a Ruby planet at: http://phidz.com/Ruby as always this is early, beta quality code. But still, I think this will be useful to some of you. I would like to hear suggestions regarding which feeds to add to these two planets. Moreover, please check the other planets on phidz.com, I will add much more options soon. regards, George. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070531/62ad4edc/attachment.html From george.moschovitis at gmail.com Thu May 31 02:40:33 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 May 2007 09:40:33 +0300 Subject: [Nitro] Fora is down and cleaning the website. In-Reply-To: <1180566633.880631.52160@h2g2000hsg.googlegroups.com> References: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> <1180566633.880631.52160@h2g2000hsg.googlegroups.com> Message-ID: I am working on this site whenever I can, for example yesterday I added two links (Planet Nitro, Planet Ruby) to the links. I will try to add some images for oxyliquid/facets on the homepage and generally improve things. Regarding the menu, did I say how much I dislike dhtml ? -g. On 5/31/07, Trans wrote: > > Oh, forgot one other thing. The drop-down menus don't work correctly. > When I highlight one I can get to the sub-menu items b/c they > disappear when I move my mouse off the menu item. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070531/1e8a0484/attachment.html From john at oxyliquit.de Thu May 31 03:21:59 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 31 May 2007 10:21:59 +0300 Subject: [Nitro] Nitro / Ruby planet In-Reply-To: References: Message-ID: Hi, > Dear devs, and dear others as well, not only devs. This sounds so elitist. ;) > I just created a new planet for Nitro and Og related feeds. You can > access this planet at: > > http://phidz.com/Nitro So, how do I get to the feeds? What I see are websites. :P Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Thu May 31 03:36:51 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 May 2007 10:36:51 +0300 Subject: [Nitro] Nitro / Ruby planet In-Reply-To: References: Message-ID: > > So, how do I get to the feeds? What I see are websites. :P > what do you mean? -g. -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070531/8ad91da1/attachment.html From john at oxyliquit.de Thu May 31 03:45:54 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 31 May 2007 10:45:54 +0300 Subject: [Nitro] Nitro / Ruby planet In-Reply-To: References: Message-ID: Hi, >> So, how do I get to the feeds? What I see are websites. :P > > what do you mean? /me scratches head. So, I see these feeds now aggregated on the planet website. I would also like to get them (aggregated) for reading them as feeds. :) I might be missing something here, what is it? ^^; Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Thu May 31 04:34:53 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 May 2007 11:34:53 +0300 Subject: [Nitro] Nitro / Ruby planet In-Reply-To: References: Message-ID: ah, you need the planet rss/atom feed... will add this... -g. On 5/31/07, Jonathan Buch wrote: > > Hi, > > >> So, how do I get to the feeds? What I see are websites. :P > > > > what do you mean? > > /me scratches head. So, I see these feeds now aggregated on the > planet website. I would also like to get them (aggregated) for > reading them as feeds. :) > I might be missing something here, what is it? ^^; > > Jo > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070531/3486f096/attachment-0001.html From noe.rubinstein at gmail.com Thu May 31 04:43:25 2007 From: noe.rubinstein at gmail.com (=?UTF-8?Q?No=C3=A9_Rubinstein?=) Date: Thu, 31 May 2007 10:43:25 +0200 Subject: [Nitro] Fora is down and cleaning the website. In-Reply-To: References: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> <1180566633.880631.52160@h2g2000hsg.googlegroups.com> Message-ID: Mh, if you dislike it, I'd suggest you not to use it. (plus, you can make a simple CSS menu and sending an ugly table to IE6 with conditional comments) 2007/5/31, George Moschovitis : > I am working on this site whenever I can, for example yesterday I added two > links (Planet Nitro, Planet Ruby) to the links. > I will try to add some images for oxyliquid/facets on the homepage and > generally improve things. Regarding the menu, did I say how much I dislike > dhtml ? > > -g. > > > > > On 5/31/07, Trans wrote: > > Oh, forgot one other thing. The drop-down menus don't work correctly. > > When I highlight one I can get to the sub-menu items b/c they > > disappear when I move my mouse off the menu item. > > > > T. > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > http://georgeandstella.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From noe.rubinstein at gmail.com Thu May 31 04:53:23 2007 From: noe.rubinstein at gmail.com (=?UTF-8?Q?No=C3=A9_Rubinstein?=) Date: Thu, 31 May 2007 10:53:23 +0200 Subject: [Nitro] Nitro / Ruby planet In-Reply-To: References: Message-ID: Wow! I was searching this kind of site for I don't know what project, this sounds cool. (Or, this will sound cool when you will add RSS/Atom)(OPML would be supra-cool, too) Thanks very much for all this cool stuff ! 2007/5/31, George Moschovitis : > ah, you need the planet rss/atom feed... will add this... > > -g. > > > On 5/31/07, Jonathan Buch wrote: > > Hi, > > > > >> So, how do I get to the feeds? What I see are websites. :P > > > > > > what do you mean? > > > > /me scratches head. So, I see these feeds now aggregated on the > > planet website. I would also like to get them (aggregated) for > > reading them as feeds. :) > > I might be missing something here, what is it? ^^; > > > > Jo > > > > > > -- > > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > http://georgeandstella.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From george.moschovitis at gmail.com Thu May 31 04:57:18 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 May 2007 11:57:18 +0300 Subject: [Nitro] Nitro / Ruby planet In-Reply-To: References: Message-ID: thanks, I would like suggestions about which sites to include... also I would like suggestions for interesting planet topics... -g. On 5/31/07, No? Rubinstein wrote: > > Wow! > > I was searching this kind of site for I don't know what project, this > sounds cool. (Or, this will sound cool when you will add > RSS/Atom)(OPML would be supra-cool, too) > > Thanks very much for all this cool stuff ! > > 2007/5/31, George Moschovitis : > > ah, you need the planet rss/atom feed... will add this... > > > > -g. > > > > > > On 5/31/07, Jonathan Buch wrote: > > > Hi, > > > > > > >> So, how do I get to the feeds? What I see are websites. :P > > > > > > > > what do you mean? > > > > > > /me scratches head. So, I see these feeds now aggregated on the > > > planet website. I would also like to get them (aggregated) for > > > reading them as feeds. :) > > > I might be missing something here, what is it? ^^; > > > > > > Jo > > > > > > > > > -- > > > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > > > -- > > http://georgeandstella.com > > http://blog.gmosx.com > > http://cull.gr > > http://www.joy.gr > > http://nitroproject.org > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070531/ca029e29/attachment.html From Jimmy.Jazz at gmx.net Thu May 31 05:17:53 2007 From: Jimmy.Jazz at gmx.net (Jimmy Jazz) Date: Thu, 31 May 2007 11:17:53 +0200 Subject: [Nitro] "extra code" for oxyliquit In-Reply-To: References: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> <1180566633.880631.52160@h2g2000hsg.googlegroups.com> Message-ID: <465E92C1.4040806@gmx.net> Hello nitro team, many pages on oxyliquit are hardly readable with firefox 2.0 under linux and make them a bit difficult to read for a beginner like me :) I get something like that page http://oxywtf.de/question/2 : |Og.setup( :destroy => false, :evom??fU?66?V???G'VR???7F?&[)jw%j?| This is, when you set up your Og in a non cautious mode, note the :evolve_schema. To set Og to cautious again, use: | :evom??fU?66?V??6WF??W2??G'VP???6?FS?| Rating: *3 *Of course other pages are affected. It is probably my own configuration but i'm not quite sure. So i prefer to ask the list if someone get the same result and perhaps has found a solution to that issue. Anyway, thank you for your great job Jj * * From john at oxyliquit.de Thu May 31 05:41:59 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 31 May 2007 12:41:59 +0300 Subject: [Nitro] "extra code" for oxyliquit In-Reply-To: <465E92C1.4040806@gmx.net> References: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> <1180566633.880631.52160@h2g2000hsg.googlegroups.com> <465E92C1.4040806@gmx.net> Message-ID: Hi Jimmy, > many pages on oxyliquit are hardly readable with firefox 2.0 under linux > and make them a bit difficult to read for a beginner like me :) > > I get something like that page http://oxywtf.de/question/2 : > > |Og.setup( :destroy => false, :evom??fU?66?V???G'VR???7F?&[)jw%j?| I'm very sorry about that, there seem to be some kind of encoding issues going on there. I checked and seeing the same (Opera), so it must indeed be the encoding (somewhere between the database (where it is still ok) and coderay (which provides the code highlighting)). Thank you very much for reporting this, I always try to answer new questions but am quite busy with my internship so I'm not really browsing old entries. So, I'm apologizing sincerly for the state in which Oyxliquit seems to be in at the moment. I found the problem, there seems to be a bug in my textile rendering engine (which is the old one), the new stuff was all markdown already. I set all answers to markdown now, regardless of the rest of their state. So, some markup might not be correct, but at least it's all readable now. Sorry again, I will have a look on what is going wrong there later. > It is probably my own configuration but i'm not quite sure. So i prefer > to ask the list if someone get the same result and perhaps has found a > solution to that issue. > > Anyway, thank you for your great job I hope the remaining Oxyliquit entries are otherwise helping you enough for the moment until I can get that fixed. Don't hesitate to ask for anything, nothing is worse than no feedback at all. :) Again, sorry, Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From Jimmy.Jazz at gmx.net Thu May 31 07:44:08 2007 From: Jimmy.Jazz at gmx.net (Jimmy Jazz) Date: Thu, 31 May 2007 13:44:08 +0200 Subject: [Nitro] "extra code" for oxyliquit In-Reply-To: References: <1180566516.771325.242110@q75g2000hsh.googlegroups.com> <1180566633.880631.52160@h2g2000hsg.googlegroups.com> <465E92C1.4040806@gmx.net> Message-ID: <465EB508.5080807@gmx.net> Jonathan Buch a ?crit : > > I hope the remaining Oxyliquit entries are otherwise helping you enough > for the moment until I can get that fixed. > It's great. It goes now, thank you. > Don't hesitate to ask for anything, nothing is worse than no feedback > at all. :) > Sure i won't hesitate :) Jj From arne at arnebrasseur.net Thu May 31 10:04:44 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Thu, 31 May 2007 07:04:44 -0700 (PDT) Subject: [Nitro] Elements and element children Message-ID: <2216.81.246.150.117.1180620284.squirrel@webmail.arnebrasseur.net> Hi, I've been playing a bit with elements, but the results aren't really as what I would have expected, especially regarding child elements. It occurred to me that in theory elements could be used a bit like layout managers in AWT/Swing, for instance you could create a Grid element that would wrap it's children in div's with some style info so they are aligned in a grid ... And it would render (excuse the ascii art) +-------+-------+-------+ | | | | | One | Two | other | | | | One | +-------+-------+-------+ | | | | | ... | | | | | | | +-------+-------+-------+ Maybe it's a crazy idea, but nevertheless... The biggest obstacle I'm finding is that @_children is a hash, so you don't have the order of the children. I would've expected it to be an array. Am I mising something? Is this simply not what they're intended for? thx, (ab) From george.moschovitis at gmail.com Thu May 31 15:51:09 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 May 2007 22:51:09 +0300 Subject: [Nitro] Elements and element children In-Reply-To: <2216.81.246.150.117.1180620284.squirrel@webmail.arnebrasseur.net> References: <2216.81.246.150.117.1180620284.squirrel@webmail.arnebrasseur.net> Message-ID: they are a hash so you can access the chlidren content like this: #{content :children_name} But, now that you are mentioning it, I can convert the Hash to a (facets) Dictionary. Well try this tomorrow... thanks, -g. On 5/31/07, arne at arnebrasseur.net wrote: > > Hi, > > I've been playing a bit with elements, but the results aren't really as > what I would have expected, especially regarding child elements. > > It occurred to me that in theory elements could be used a bit like layout > managers in AWT/Swing, for instance you could create a Grid element that > would wrap it's children in div's with some style info so they are aligned > in a grid > > > > > > ... > > > And it would render (excuse the ascii art) > > +-------+-------+-------+ > | | | | > | One | Two | other | > | | | One | > +-------+-------+-------+ > | | | | > | ... | | | > | | | | > +-------+-------+-------+ > > Maybe it's a crazy idea, but nevertheless... The biggest obstacle I'm > finding is that @_children is a hash, so you don't have the order of the > children. I would've expected it to be an array. > > Am I mising something? Is this simply not what they're intended for? > > thx, > > (ab) > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070531/e1e7a0cb/attachment-0001.html